-
Notifications
You must be signed in to change notification settings - Fork 15
43 lines (41 loc) · 1.16 KB
/
build.yml
File metadata and controls
43 lines (41 loc) · 1.16 KB
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
name: Build
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 12
- name: Install Yarn
run: npm i -g yarn
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Install and build
run: |
yarn install --frozen-lockfile
npm run build-site
node ./scripts/copy-master.js
- name: Deploy master
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: master
folder: dist/master
- name: Deploy pages
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: gh-pages
folder: dist/pages