-
Notifications
You must be signed in to change notification settings - Fork 4
43 lines (35 loc) · 977 Bytes
/
build.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
name: Build static site, deploy
on:
workflow_dispatch:
push:
schedule:
- cron: '0 3 * * *'
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies & build
run: |
npm ci
BASE_URL=${{ vars.BASE_URL }} npm run build
- name: Unit test and eslint check
run: |
npm run test
npm run test:eslint
- name: Deploy GH Pages
if: contains(github.ref, 'main')
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./_site/nhsbsa-digital-playbook
github_token: ${{ secrets.GITHUB_TOKEN }}
exclude_assets: '_redirects'