Skip to content

Update Node.js version and action versions in deployment workflow #10

Update Node.js version and action versions in deployment workflow

Update Node.js version and action versions in deployment workflow #10

name: Deploy Website
on:
push:
branches: [website]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
checks:
if: github.event_name != 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '22.x'
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Test Build
run: |
yarn build
# Verify 404.html exists
ls -la build/ | grep 404.html || echo "404.html not found!"
gh-release:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '22.x'
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build website
run: yarn build
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './build'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1