Fix GitHub Pages deploy: Release workflow never deploys - #77
Merged
Conversation
The Release workflow triggered on `pull_request: closed [release]`, so its jobs
ran in the PR-merge ref context (refs/pull/N/merge). The github-pages
environment only allows deployments from the `main`/`release` branches, so the
deploy was always rejected ("Branch refs/pull/N/merge is not allowed to deploy
to github-pages"). The workflow had in fact never deployed successfully.
Follow the official VitePress GitHub Pages guide: trigger on `push` to the
release branch (plus workflow_dispatch). The run then executes in the `release`
branch context, which is now an allowed deployment branch for the github-pages
environment, so deploy-pages succeeds.
Also drop the `if: github.event.pull_request.merged == true` guards on all three
jobs (obsolete once the trigger is push/dispatch rather than pull_request).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
sn0wm1ku
self-requested a review
July 9, 2026 12:04
sn0wm1ku
approved these changes
Jul 9, 2026
1 task
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1. Target
Fix GitHub Pages deployment: the Release workflow has never deployed the site
successfully.
2. Specification / Test Plan
Problem.
.github/workflows/release.ymltriggered onpull_request: types:[closed], branches:[release], so the deploy job ran in thePR-merge ref context (
refs/pull/N/merge). Thegithub-pagesenvironment onlyallows deployments from
main/release, soactions/deploy-pageswasrejected — "Branch refs/pull/63/merge is not allowed to deploy to github-pages
due to environment protection rules." The VitePress build succeeded; only the
deploy step failed, and the workflow had never deployed successfully.
Change (approach C — keep the release-branch gate).
release.yml: trigger onpush: branches:[release](plusworkflow_dispatch)instead of
pull_request: closed; drop the obsoleteif: github.event.pull_request.merged == trueguards on all three jobs. Therun then executes in the
releasebranch context.github-pagesenvironment:releaseadded to the allowed deployment branches(applied in repo settings; not part of this diff).
Aligns with the official VitePress GitHub Pages guide (deploy on push to the
publishing branch).
Verification.
mainand merged torelease(a push torelease), the Releaseworkflow runs from the
releasecontext anddeploy-pagessucceeds (noenvironment-protection rejection).
/style-guide(currently404).
pnpm docs:build) already passes.3. Additional Instructions / Notes for Shipping (optional)
This workflow change only takes effect once it is on the
releasebranch (apushevent uses the workflow from the pushed commit). To publish:main.releaseto its pre-Release Candidate 2026-07-09 20:09:51 +0900 #63 state and re-create the release PR(main → release) so it carries this fix and the Style Guide.
release→ the Release workflow deploys.The
github-pagesenvironment already allowsrelease.4. Check before Review Request
5. Evidence
The evidence for a deploy-trigger change is the successful Release workflow
run (build + deploy) after the fix reaches
release. It cannot be producedbefore merge, since the trigger only fires on
pushtorelease. The deployrejection this fixes is recorded in #76.