Merge pull request #27 from Health-Education-England/refactor-reasons… #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to GitHub Pages | |
permissions: | |
contents: write | |
on: | |
push: | |
branches: main | |
workflow_dispatch: | |
jobs: | |
deploy: | |
name: Deploy to GitHub pages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: npm | |
- name: Build | |
run: npm install && npm run build | |
- name: Deploy | |
run: | | |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
npm run deploy | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |