Fix docs-deploy: add permissions block to Documentation caller job#148
Merged
ChrisRackauckas merged 1 commit intoJun 21, 2026
Merged
Conversation
The CI-centralization migration (centralizing on the SciML reusable
`documentation.yml@v1`) dropped the `permissions:` block from the
`.github/workflows/Documentation.yml` caller job. The reusable workflow
declares no permissions of its own and deploys via
`GITHUB_TOKEN: ${{ inputs.github-token || secrets.GITHUB_TOKEN }}`, so
the caller job's permissions flow through to the token. Without the
block the token is read-only and Documenter's `deploydocs` cannot push
to gh-pages (403 / permission denied).
Add `actions: write`, `contents: write`, `statuses: write` to the
caller job, mirroring the proven fix in
SciML/OrdinaryDiffEqOperatorSplitting.jl#90.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Superseded by SciML/.github#102, which sets |
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
The docs build passes, but the
deploydocspush togh-pagesfails (403 / GITHUB_TOKEN cannot push).Root cause
The CI-centralization migration (centralizing on the SciML reusable
documentation.yml@v1) dropped thepermissions:block from the.github/workflows/Documentation.ymlcaller job.The reusable workflow declares no permissions of its own and deploys via:
Because the reusable declares no
permissions:, the caller job's permissions flow through to theGITHUB_TOKEN. With no block on the caller, the token is read-only, so Documenter'sdeploydocscannot push togh-pages.Fix
Add a
permissions:block to the caller job:This mirrors the proven fix in SciML/OrdinaryDiffEqOperatorSplitting.jl#90 exactly.
This repo deploys via GITHUB_TOKEN (no DOCUMENTER_KEY required), so
contents: writeis what enables the gh-pages push. The docs check is not disabled andwarnonlyis not set.Verification
python3 -c "yaml.safe_load(...)"— parses cleanly; thebuild.permissionsblock resolves to{actions: write, contents: write, statuses: write}.master(deploydocs only pushes onpushevents, not PRs). The change is correct by construction by matching the proven Fix small bugs/inconsistencies in GP #90 pattern.Please ignore until reviewed by @ChrisRackauckas.