-
Notifications
You must be signed in to change notification settings - Fork 4
42 lines (37 loc) · 1.16 KB
/
react-web-ci-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
name: react-web CI/CD
on:
push:
branches:
- web-deploy
jobs:
build-and-deploy-react-web:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x]
deploy-mst-json-path: [mst.json]
steps:
- uses: actions/checkout@v1
- name: setup ubuntu
run: sudo apt-get --quiet update --yes
- name: curl install
run: sudo apt-get install curl
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: yarn install
working-directory: ./react-web
run: yarn install
- name: yarn build
working-directory: ./react-web
run: yarn run build
- name: npm install, build
working-directory: ./react-web
run: curl -X GET -L https://script.google.com/macros/s/AKfycbzKoorJ9Cj_DpxhuP4r7pjDsii0htaQFuX9P0Caucs4S0skqtPeTdLf8U4Y2h7_uKOd2Q/exec > build/${{ matrix.deploy-mst-json-path }}
- name: deploy
uses: peaceiris/actions-gh-pages@v2.5.0
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: react-web/build