Restore contents:write permission for docs deploy (fix gh-pages 403)#76
Closed
ChrisRackauckas-Claude wants to merge 1 commit into
Closed
Conversation
The Documentation deploy fails on main: the docs build succeeds but
deploydocs cannot push to gh-pages (403 / Permission denied).
The CI-centralization migration replaced the docs job with a thin caller
of SciML/.github/.github/workflows/documentation.yml@v1 and dropped the
permissions: block. This repo has no DOCUMENTER_KEY secret, so Documenter
deploys via GITHUB_TOKEN. The reusable workflow declares no permissions,
so the caller job's (default read-only contents) permissions flow through
to the token, which can no longer push to gh-pages.
Add permissions: { actions: write, contents: write, statuses: write } to
the caller docs job, restoring the token-based deploy mechanism. Mirrors
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 Documentation deploy fails on
main. The docs build succeeds — the failure is in thedeploydocsstep, which pushes togh-pagesand gets a 403 / "Permission denied" (GITHUB_TOKEN cannot push).Root cause
DOCUMENTER_KEYsecret, so Documenter'sdeploydocsfalls back to pushing togh-pagesviaGITHUB_TOKEN.SciML/.github/.github/workflows/documentation.yml@v1and dropped thepermissions:block from the callerdocsjob.permissions, so for auses:reusable-workflow job the caller job's permissions (now the default, read-onlycontents) flow through to theGITHUB_TOKENused inside the called workflow. A read-only token cannot push togh-pages→ 403.Fix
Add
permissions: { actions: write, contents: write, statuses: write }to the callerdocsjob in.github/workflows/Documentation.yml. This restores the token-based deploy mechanism the repo depends on (noDOCUMENTER_KEYrequired). Mirrors the proven fix in SciML/OrdinaryDiffEqOperatorSplitting.jl#90 exactly.Verification
python3 yaml.safe_load(parses; thedocsjob carries the three permissions).main(the gh-pages push only happens on a realmain/tag run). The change is correct by matching the proven #90 pattern: it grants the caller job the samecontents: write(plusactions/statuseswrite) that the reusable workflow needs to flow into theGITHUB_TOKEN.This does not disable the docs check or set
warnonly.Please ignore until reviewed by @ChrisRackauckas