Skip to content

Fix GitHub Pages deploy: Release workflow never deploys - #77

Merged
sn0wm1ku merged 3 commits into
mainfrom
i76-20260709-2102
Jul 9, 2026
Merged

Fix GitHub Pages deploy: Release workflow never deploys#77
sn0wm1ku merged 3 commits into
mainfrom
i76-20260709-2102

Conversation

@github-actions

@github-actions github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

1. Target

Fix GitHub Pages deployment: the Release workflow has never deployed the site
successfully.

2. Specification / Test Plan

Problem. .github/workflows/release.yml triggered on
pull_request: types:[closed], branches:[release], so the deploy job ran in the
PR-merge ref context (refs/pull/N/merge). The github-pages environment only
allows deployments from main / release, so actions/deploy-pages was
rejected — "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 on push: branches:[release] (plus workflow_dispatch)
    instead of pull_request: closed; drop the obsolete
    if: github.event.pull_request.merged == true guards on all three jobs. The
    run then executes in the release branch context.
  • github-pages environment: release added 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.

  • Once on main and merged to release (a push to release), the Release
    workflow runs from the release context and deploy-pages succeeds (no
    environment-protection rejection).
  • handbook.osbrjp.com serves the latest content, incl. /style-guide (currently
    404).
  • The build job (pnpm docs:build) already passes.

3. Additional Instructions / Notes for Shipping (optional)

This workflow change only takes effect once it is on the release branch (a
push event uses the workflow from the pushed commit). To publish:

  1. Merge this PR into main.
  2. Roll back release to 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.
  3. Merge the release PR → push to release → the Release workflow deploys.

The github-pages environment already allows release.

4. Check before Review Request

  • Self Review : I reviewed changes by myself and approved them.
    • Ensure there is no sensitive information, typos, unrelated changes, or debugging code.
  • Evidence : I attached evidences to prove the changes.
    • Record and attach a demo video. For minor changes, attaching an image is also acceptable.
    • Evidences should be updated to the latest version when further changes are made.

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 produced
before merge, since the trigger only fires on push to release. The deploy
rejection this fixes is recorded in #76.

sn0wm1ku and others added 2 commits July 9, 2026 21:00
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>
@github-actions github-actions Bot added fix A mirror label for the "Fix" issue type. 🔄 CI/CD Configuring GitHub Actions. labels Jul 9, 2026
@sn0wm1ku
sn0wm1ku self-requested a review July 9, 2026 12:04
@github-actions github-actions Bot added the ci-testing Enable a GitHub Action for unit testing on a pull request. label Jul 9, 2026
@sn0wm1ku
sn0wm1ku merged commit 170ec97 into main Jul 9, 2026
2 checks passed
@sn0wm1ku
sn0wm1ku deleted the i76-20260709-2102 branch July 9, 2026 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔄 CI/CD Configuring GitHub Actions. ci-testing Enable a GitHub Action for unit testing on a pull request. fix A mirror label for the "Fix" issue type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix GitHub Pages deploy: Release workflow never deploys

2 participants