Skip to content

fix(ci): deploy Pages once per release instead of twice - #219

Merged
TMHSDigital merged 1 commit into
mainfrom
fix/215-pages-single-deploy
Sep 23, 2026
Merged

TMHSDigital merged 1 commit into
mainfrom
fix/215-pages-single-deploy

Conversation

@TMHSDigital

Copy link
Copy Markdown
Owner

Summary

Closes #215. Every release-worthy push to main started two Pages deploys: one from the push, then one from release.yml's dispatch after the version bump. The dispatch cancelled the first. 8 of the last 9 push-triggered runs were cancelled.

Type

  • feat
  • fix — CI waste; a single deploy per release
  • docs / chore / ci / refactor

Changes

  • New gate job in pages.yml. On a push, it takes the first line of each pushed commit (github.event.commits) and applies the same subject test release.yml uses (^(feat|feature|fix)(\(.+\))?!?:|BREAKING[ -]CHANGE). A match means a release will dispatch Pages, so the push deploy is skipped. workflow_dispatch always deploys, and so do non-release pushes (docs:, chore:, …).
  • .github/workflows/pages.yml added to its own paths:, so editing the deploy workflow deploys.

Trade-off: if the release job fails after a fix:/feat: push, nothing deploys that push; before, the cancelled-by-dispatch run would have finished. The workflow comment names the recovery: Actions → Deploy GitHub Pages → Run workflow.

Evidence

  • live-run-proven (local):

    • pages.yml parses as YAML.

    • The gate's matching was exercised with a Python equivalent of the jq extraction, since jq isn't installed locally:

      Input Result
      fix(site): x (#209) + body skip
      feat!: big skip
      chore(scripts): … deploy
      docs: fix typo in fix: text deploy (anchored match)
      docs + fix mixed push skip
      empty (dispatch) deploy
  • To verify post-merge: this PR is a fix: that touches pages.yml. The merge push should show gate → deploy=false with build-and-deploy skipped, then exactly one successful deploy from the release dispatch.

Checklist

  • Explicit paths only.
  • Counts and manifest unchanged.
  • DCO Signed-off-by: present.
  • No credentials, emails, or local paths.

🤖 Generated with Claude Code

Every release-worthy push started two Pages deploys: the push itself, then
release.yml's dispatch after the version bump, which cancelled the first
(8 of the last 9 push runs were cancelled). A gate job now applies
release.yml's own commit-subject test to the pushed commits and skips the
push deploy when a release will dispatch one. Non-release pushes (docs,
chore) and manual dispatches deploy as before.

Also adds pages.yml to its own trigger paths, so a change to the deploy
workflow deploys.

Closes #215

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com>
@github-actions github-actions Bot added the ci label Sep 23, 2026
@TMHSDigital
TMHSDigital merged commit 427dc0b into main Sep 23, 2026
11 checks passed
@TMHSDigital
TMHSDigital deleted the fix/215-pages-single-deploy branch September 23, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: every content push starts two Pages deploys and cancels the first

1 participant