fix(ci): add pages and id-token permissions to deploy job#137
Closed
teetangh wants to merge 2 commits into
Closed
Conversation
Required for GitHub Pages workflow-mode deployments so JamesIves action can create a proper Pages deployment, not just push to branch.
Contributor
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the documentation deployment workflow so GitHub Pages (configured for “GitHub Actions / workflow” builds) can create an official Pages deployment record instead of only pushing to gh-pages, ensuring the live site updates after merges.
Changes:
- Grant
pages: writeandid-token: writepermissions to the deploy job. - Declare the
github-pagesenvironment and wire the deployment step with anidfor environment URL output usage.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
@teetangh Close this out if you are done with the verification & don't need this change |
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.
Problem
After the Google Analytics PR (#134) was merged on April 15, the live site at
mcp-server.couchbase.comcontinued serving the April 13 build — without the GTM/GA4 scripts.Root cause: GitHub Pages is configured in workflow mode (
build_type: workflow). In this mode, pushing to thegh-pagesbranch alone is not enough — the workflow must also havepages: writeandid-token: writepermissions soJamesIves/github-pages-deploy-actioncan create an official GitHub Pages deployment via the API. Without these permissions, the branch gets updated but no new Pages deployment is created, so the live site stays on the old build.Evidence:
gh api repos/.../pages→"build_type": "workflow"gh-pagessuccessfully, but no Pages deployment record createdFix
Add
pages: write+id-token: writeto the deploy job and declare thegithub-pagesenvironment so JamesIves creates a proper Pages deployment.After merging
Once merged, manually trigger the workflow via Actions → Deploy Docs → Run workflow to redeploy the current build (which already has GTM-MVPNN2 + G-CVKKEY0D6B) to production.