Skip to content

fix(ci): add pages and id-token permissions to deploy job#137

Closed
teetangh wants to merge 2 commits into
mainfrom
fix/deploy-pages-permissions
Closed

fix(ci): add pages and id-token permissions to deploy job#137
teetangh wants to merge 2 commits into
mainfrom
fix/deploy-pages-permissions

Conversation

@teetangh
Copy link
Copy Markdown
Contributor

Problem

After the Google Analytics PR (#134) was merged on April 15, the live site at mcp-server.couchbase.com continued 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 the gh-pages branch alone is not enough — the workflow must also have pages: write and id-token: write permissions so JamesIves/github-pages-deploy-action can 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"
  • Last Pages deployment: April 13 (pre-analytics)
  • April 15 JamesIves run log: pushed to gh-pages successfully, but no Pages deployment record created

Fix

Add pages: write + id-token: write to the deploy job and declare the github-pages environment 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.

Required for GitHub Pages workflow-mode deployments so JamesIves
action can create a proper Pages deployment, not just push to branch.
Copilot AI review requested due to automatic review settings April 17, 2026 06:39
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: write and id-token: write permissions to the deploy job.
  • Declare the github-pages environment and wire the deployment step with an id for environment URL output usage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@teetangh teetangh self-assigned this Apr 17, 2026
@nithishr
Copy link
Copy Markdown
Contributor

@teetangh Close this out if you are done with the verification & don't need this change

@teetangh teetangh closed this Apr 22, 2026
@nithishr nithishr deleted the fix/deploy-pages-permissions branch April 22, 2026 16:12
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.

3 participants