From 0f0a9e461cebcb659100ba47cc64d258db2b44dc Mon Sep 17 00:00:00 2001 From: tannevaled Date: Wed, 26 Aug 2026 15:53:03 +0200 Subject: [PATCH] ci(pages): build on pull requests This workflow ran only on main, so anything opened against this repository arrives 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. Build on pull_request too. The deploy job is unchanged except that it now runs only for push or workflow_dispatch: a pull request has built the site, which is the whole point of the gate, and it has no business replacing what is served. Verified before pushing: hugo builds this tree locally with the version the workflow pins, so the new gate lands green rather than red. --- .github/workflows/deploy-pages.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index ea6897b..3c52684 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-pages.yml @@ -3,6 +3,12 @@ name: deploy-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: permissions: @@ -40,6 +46,10 @@ jobs: path: public deploy: + # Only main publishes. A pull request stops after build above: it has built + # the site, 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' needs: build runs-on: ubuntu-latest environment: