-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (40 loc) · 1.2 KB
/
deploy.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: Deploy Project
on:
push:
branches:
- main
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Node.js
uses: actions/setup-node@master
with:
node-version: 12.x
- name: Make .env.production
run: cd boardgame && echo -e ${{secrets.ENV_PRODUCTION}} > .env.production
- name: Where am I
run: cd boardgame && cat .env.production
- name: Cache node_modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{runner.OS}}-build-${{hashFiles('**/yarn.lock')}}
restore-keys: |
${{ runner.OS }}-build-${{ runner.OS }}-
- name: Install dependencies
run: cd boardgame && npm install
- name: Build
run: cd boardgame && npm run build
env:
NODE_ENV: production
- name: Build check
run: cd boardgame && cd build && ls -l
- name: Deploy
uses: peaceiris/[email protected]
env:
PERSONAL_TOKEN: ${{secrets.GITHUB_TOKEN}}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./boardgame/build
SCRIPT_MODE: true