-
Notifications
You must be signed in to change notification settings - Fork 15
49 lines (46 loc) · 1.26 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
45
46
47
48
49
name: Deploy
on:
push:
branches:
- master
env:
NODE: 12.x
jobs:
deploy:
if: "!contains(github.event.commits[0].message, '[skip ci]')"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Node
uses: actions/setup-node@v1
with:
node-version: "${{ env.NODE }}"
- name: Cache
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
**/node_modules
~/.npm
key: ${{ runner.os }}-node-v${{ env.NODE }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-v${{ env.NODE }}-yarn-
- name: Install
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.github_pages_github_token }}
BRANCH: gh-pages
FOLDER: public
GIT_CONFIG_NAME: minimit
GIT_CONFIG_EMAIL: beaver82@gmail.com