Skip to content

Commit 8b5c73a

Browse files
authored
chore(CI): add gh-pages deploy workflow
1 parent 6a98aff commit 8b5c73a

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/github-pages.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: 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@v2
16+
with:
17+
node-version: '12.x'
18+
19+
- name: Cache dependencies
20+
uses: actions/cache@v2
21+
with:
22+
path: ~/.yarn
23+
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
24+
restore-keys: |
25+
${{ runner.os }}-node-
26+
27+
- run: yarn install --frozen-lockfile
28+
- run: yarn test
29+
- run: yarn predeploy:prefix # builds the docs site with --prefix-paths for gh-pages
30+
31+
- name: Deploy
32+
uses: peaceiris/actions-gh-pages@v3
33+
with:
34+
github_token: ${{ secrets.GITHUB_TOKEN }}
35+
publish_dir: ./www/public

0 commit comments

Comments
 (0)