Skip to content

Commit bdf86ae

Browse files
committed
chore: add github deploy action
1 parent 1431172 commit bdf86ae

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Deploy to Github Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-18.04
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Setup Node
15+
uses: actions/setup-node@v1
16+
with:
17+
node-version: '14.x'
18+
19+
- name: Get yarn cache
20+
id: yarn-cache
21+
run: echo "::set-output name=dir::$(yarn cache dir)"
22+
23+
- name: Cache dependencies
24+
uses: actions/cache@v1
25+
with:
26+
path: ${{ steps.yarn-cache.outputs.dir }}
27+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
28+
restore-keys: |
29+
${{ runner.os }}-yarn-
30+
31+
- run: yarn install --frozen-lockfile
32+
- run: yarn build
33+
- run: yarn build:playground
34+
35+
- name: Deploy
36+
uses: peaceiris/actions-gh-pages@v3
37+
with:
38+
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
publish_dir: ./playground/dist

0 commit comments

Comments
 (0)