From 59c5d80e786dc1883330ae7c4913a276270dc437 Mon Sep 17 00:00:00 2001 From: Kar Epker Date: Sun, 30 Aug 2026 22:37:15 -0700 Subject: [PATCH] Build but do not deploy on pull requests. The workflow's bare `pull_request:` trigger ran the whole job, including actions/deploy-pages, so opening a PR published that branch to production before anyone reviewed it. Gate the deploy step on the event name; PRs still build, so a broken build still fails the check. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_013VoExRdWR65QGg7v6qMqAV --- .github/workflows/deploy-to-ghpages.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-to-ghpages.yml b/.github/workflows/deploy-to-ghpages.yml index 7d88ba6..c06292a 100644 --- a/.github/workflows/deploy-to-ghpages.yml +++ b/.github/workflows/deploy-to-ghpages.yml @@ -7,7 +7,7 @@ on: push: branches: - main - pull_request: + pull_request: # builds only; the deploy step below is skipped jobs: deploy: @@ -33,6 +33,10 @@ jobs: with: path: ./_site + # Pull requests stop at the build: a green check means the site compiles, + # not that it shipped. Without this, opening a PR published it straight to + # production. - name: Deploy to GitHub Pages id: deployment + if: github.event_name != 'pull_request' uses: actions/deploy-pages@v4