-
Notifications
You must be signed in to change notification settings - Fork 28
69 lines (55 loc) · 1.7 KB
/
deploy_web.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Deploy Web
on:
push:
branches: [main]
env:
BEFORE_SHA: ${{ github.event.before }}
cache-name: npm
defaults:
run:
working-directory: ./website
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Fetch repository
run: git fetch origin main
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: npm ci
- name: Summarize install
run: echo '### Dependencies Installed! :heavy_check_mark:' >> $GITHUB_STEP_SUMMARY
- name: Generate dynamic pages
run: npm run generate-dynamic-pages
- name: Build docs
run: npm run build
- name: Summarize build
run: echo '### Website Built! :heavy_check_mark:' >> $GITHUB_STEP_SUMMARY
- name: Turn off History Expansion
run: set +H
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: ./website/build/
- name: Summarize deploy
run: echo '### Deployed to Pages! :rocket:' >> $GITHUB_STEP_SUMMARY