GitHub Actions Pages "pages: write permission denied"
Deploying to Pages from Actions requires pages: write on GITHUB_TOKEN. With the default read-only token the deployment API returns resource-not-accessible. This is a deterministic permission gap.
What this error means
A Pages deploy step fails with a 403 resource-not-accessible-by-integration error referencing the Pages deployment endpoint.
github-actions
Error: Resource not accessible by integration (pages deployment)
HttpError: 403 - missing 'pages: write' permissionCommon causes
pages: write not granted
The job permissions do not include pages, so GITHUB_TOKEN cannot create the Pages deployment.
Restrictive top-level permissions
A top-level permissions block omitting pages overrides the per-job default.
How to fix it
Grant pages: write on the job
- Add pages: write (and id-token: write) to the deploy job permissions.
- Confirm no conflicting top-level permissions block removes it.
- Re-run the workflow.
.github/workflows/pages.yml
deploy:
permissions:
pages: write
id-token: write
contents: readHow to prevent it
- Set pages: write explicitly on the Pages deploy job.
- Audit top-level permissions so they do not silently strip pages.
Related guides
GitHub Actions "actions/deploy-pages: Failed to create deployment"Fix the actions/deploy-pages error "Failed to create deployment" - a permissions gap or a transient Pages API…
GitHub Pages "Get Pages site failed" (Pages not enabled)Fix the github-pages error "Get Pages site failed" - Pages is not enabled or not set to GitHub Actions as the…
GitHub Pages "Deployment request failed (no artifact)"Fix the github-pages error where the deployment request failed because no github-pages artifact was uploaded…