-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.09 KB
/
cd-workflow.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
name: CD Workflow
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: yarn install & build
run: |
yarn install
yarn build
cd deploy
mv CNAME.template CNAME
mv LICENSE.template LICENSE
mv ../packages/frontend/dist/index.html .
mv ../packages/frontend/dist/frontend.bundle.js .
- name: Deploy webpage
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.GITHUB_PAGES }}
external_repository: elite-se/elite-se.github.io
publish_branch: master
publish_dir: deploy
user_email: [email protected]
user_name: GitHub Action
commit_message: 'deploy ${{ github.event.head_commit.message }}'