-
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 1.62 KB
/
continuous-integration.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Continuous Integration
on:
push:
branches:
- main
merge_group:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
continuous-integration:
runs-on: ubuntu-latest
steps:
- uses: escemi-tech/[email protected]
with:
checks: true
publish:
needs: continuous-integration
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment: github-pages
steps:
- uses: escemi-tech/[email protected]
with:
checkout: '{ "token": "${{ secrets.GH_PRIVATE_ACCESS_TOKEN }}" }'
- name: 🏗️ Build Github pages
run: |
mkdir -p /tmp/publish
echo "theme: jekyll-theme-cayman" > /tmp/publish/_config.yml
cp README.md /tmp/publish/index.md
- name: 🌐 Publish Github pages
uses: peaceiris/[email protected]
with:
enable_jekyll: true
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: /tmp/publish
user_name: ${{ github.actor }}
user_email: ${{ github.actor }}@users.noreply.github.com
- name: 📦 Publish NPM packages
env:
NPM_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
GH_TOKEN: ${{ secrets.GH_PRIVATE_ACCESS_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
git config --local user.email "${{ github.actor }}@users.noreply.github.com"
git config --local user.name "${{ github.actor }}"
yarn lerna publish --conventional-commits --create-release github --yes