From 5c238d626971a128e777bfad7c1c53c77f6bca52 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Fri, 21 Aug 2026 00:55:50 +0200 Subject: [PATCH] ci: build the landing page on pull requests too The workflow ran only on pushes to main, so a pull request touching the layout, the content or the Hugo version got no signal at all -- its checks read "no checks", which is not the same thing as green. Two changes, and only two: a pull_request trigger so the existing build job runs on every PR, and a guard on deploy so a pull request stops after building and uploading the artifact rather than replacing what is served. This file puts `environment:` before `needs:`, an ordering the other 192 landing pages do not use. The transform was taught that second shape rather than these three being edited by hand, and it still refuses anything it does not recognise -- an already-gated file is refused, and the 192 produce byte-identical output to before. Checked while here: HUGO_VERSION is pinned at 0.135.0, the same stale pin that had frozen go-filesystems.github.io at 15 cards when its template started using hugo.Data. This site does NOT use hugo.Data, builds identically on 0.135.0 and 0.162.1, and the live page matches the built output, so the pin is harmless here and is left alone. Co-Authored-By: Claude Opus 5 --- .github/workflows/hugo.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml index dc48768..4fc10af 100644 --- a/.github/workflows/hugo.yml +++ b/.github/workflows/hugo.yml @@ -7,6 +7,12 @@ name: Deploy Hugo site to Pages on: push: branches: [main] + # Build on every pull request too, so a change to the layout, the content or + # the Hugo version has to prove the site still builds before it lands. + # Without this the workflow ran only on main, which meant a dependency bump + # arrived with no signal at all -- its checks read "no checks", which is not + # the same thing as green and must not be merged as if it were. + pull_request: workflow_dispatch: # Allow only one concurrent deployment, skipping runs queued between @@ -61,6 +67,10 @@ jobs: path: ./public deploy: + # Only main publishes. A pull request stops after build above: it has built + # the site and uploaded the artifact, which is the whole point of the gate, + # and it has no business replacing what is served. + if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }}