Skip to content

Fix Pages deployment for tagged releases blocked by environment protection rules - #19

Closed
d3mocide with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-pages-deployment-workflow
Closed

d3mocide with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-pages-deployment-workflow

Conversation

Copilot AI commented Sep 4, 2026 •

Copy link
Copy Markdown

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." The release: released event runs on the tag ref (refs/tags/vX.Y.Z), but the repo's github-pages environment only allows branch refs, so the job is rejected before any step executes.

Changes

  • Removed the environment: block from the deploy job in pages.yml. This block is the mechanism through which environment protection rules are enforced; without it, tag refs deploy without restriction. actions/deploy-pages@v4 publishes to the same Pages site regardless — the block only provided deployment URL tracking in the Actions sidebar.
  • Updated trigger comments to document why the 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 via workflow_run on Build, which runs on main. Unaffected.
  • Draft safety — release: released only fires when a release is published, not drafted. The draft-then-publish staging flow in release.yml is unchanged.

…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
Copilot AI requested a review from d3mocide September 4, 2026 03:17
@d3mocide d3mocide closed this Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants