From 21ddf98cdb9321c4fcda1b02e47d0f1889e69c5e Mon Sep 17 00:00:00 2001 From: AutomatedTester Date: Thu, 13 Aug 2026 10:55:24 +0100 Subject: [PATCH] Deploy site via GitHub Actions instead of branch-based Pages The Pages source is currently "deploy from a branch" (trunk /docs), so GitHub generates and runs its own pages-build-deployment workflow. That generated workflow pins actions/checkout@v4 and actions/upload-artifact@v4, which target Node.js 20 and now emit a deprecation warning on every run. Those versions live in GitHub's infrastructure, not this repo, so there is nothing here to bump. Take ownership of the deploy instead. All four actions are on current majors, which run on Node.js 24, clearing the warning. This also drops the pointless "Build with Jekyll" step the legacy path runs against our already-built Hugo output. Pull requests build only; deploys are gated to non-PR events. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/deploy.yml | 69 ++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..dad6c6b --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,69 @@ +name: Deploy Hugo site to Pages + +on: + push: + branches: + - trunk + pull_request: + branches: + - trunk + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment, skipping runs queued between the in-progress +# run and the latest queued run, but never cancelling an in-progress deploy. +concurrency: + group: pages-${{ github.ref }} + cancel-in-progress: false + +env: + HUGO_VERSION: 0.164.0 + +jobs: + build: + runs-on: ubuntu-24.04 + steps: + - name: Install Hugo CLI + run: | + wget -O "${{ runner.temp }}/hugo.deb" \ + "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb" + sudo dpkg -i "${{ runner.temp }}/hugo.deb" + + - name: Checkout + uses: actions/checkout@v7 + with: + submodules: recursive + fetch-depth: 0 + + - name: Setup Pages + id: pages + uses: actions/configure-pages@v6 + + - name: Build + env: + HUGO_ENVIRONMENT: production + TZ: Europe/London + run: hugo --gc --minify + + - name: Upload artifact + uses: actions/upload-pages-artifact@v5 + with: + # Matches publishDir in hugo.toml + path: ./docs + + # Pull requests build only — deploying happens once the change lands on trunk. + deploy: + if: github.event_name != 'pull_request' + needs: build + runs-on: ubuntu-24.04 + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v5