Skip to content

Build static site, deploy #1433

Build static site, deploy

Build static site, deploy #1433

Workflow file for this run

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'