Skip to content

Commit 3df2b92

Browse files
authored
Create publishwebsite.yml
1 parent e2a7afb commit 3df2b92

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish Website
2+
3+
on:
4+
push:
5+
branches: # triggers on any push to master
6+
- master
7+
8+
jobs:
9+
build-deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v1
13+
- run: node --version
14+
- name: Cache node modules
15+
uses: actions/cache@v1
16+
with:
17+
path: ~/.npm
18+
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
19+
restore-keys: |
20+
${{ runner.os }}-npm-
21+
- name: Install dependencies
22+
run: npm ci
23+
- name: Test
24+
run: npm run test --if-present
25+
- name: Build
26+
run: npm run build --if-present
27+
- name: Deploy
28+
uses: peaceiris/actions-gh-pages@v3
29+
with:
30+
github_token: ${{ secrets.GITHUB_TOKEN }}
31+
publish_dir: ./dist

0 commit comments

Comments
 (0)