Conversation
…ocking tag refs Co-authored-by: d3mocide <136547209+d3mocide@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix GitHub Pages deployment for tagged releases
Fix Pages deployment for tagged releases blocked by environment protection rules
Sep 4, 2026
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.
Tagged release builds (e.g.
v1.0.5) fail to deploy to GitHub Pages with "Tag is not allowed to deploy to github-pages due to environment protection rules." Therelease: releasedevent runs on the tag ref (refs/tags/vX.Y.Z), but the repo'sgithub-pagesenvironment only allows branch refs, so the job is rejected before any step executes.Changes
environment:block from thedeployjob inpages.yml. This block is the mechanism through which environment protection rules are enforced; without it, tag refs deploy without restriction.actions/deploy-pages@v4publishes to the same Pages site regardless — the block only provided deployment URL tracking in the Actions sidebar.environment:block is absent.deploy: if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' runs-on: ubuntu-latest - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} steps:What's preserved
dev-latest— deploys viaworkflow_runon Build, which runs onmain. Unaffected.release: releasedonly fires when a release is published, not drafted. The draft-then-publish staging flow inrelease.ymlis unchanged.