-
Notifications
You must be signed in to change notification settings - Fork 105
45 lines (36 loc) · 1.13 KB
/
CD.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
---
# Documentation:https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: Continuous Deployment
on:
push:
branches: [develop]
jobs:
deploy:
name: Build and Deploy app to GitHub Pages
runs-on: ubuntu-latest
steps:
- name: Checkout the code base
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install dependencies
run: |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
npm ci
npx lerna bootstrap
rm -rf .npmrc
- name: Build for Production
run: npm run build:gh
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./app/dist
force_orphan: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
full_commit_message: 'deploy: publish app to GitHub Pages'