ci: deploy GitHub Pages from an artifact - #1042
Merged
Merged
Conversation
The deploy authenticated as a personal access token on an account with no write access to this repository, so the push to `gh-pages` was rejected. Rather than reissue it, publish through the Pages deployment API: the job trades `contents: write` for `pages: write`, so it can no longer write to any branch, and there is no long-lived credential to rotate. This also moves off the deprecated node20 runtime that `peaceiris/actions-gh-pages` still runs on. Requires the repository's Pages source to be set to GitHub Actions. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
rekmarks-consensys-1
removed this pull request from the merge queue due to a manual request
Sep 3, 2026
rekmarks-consensys-1
enabled auto-merge
September 3, 2026 23:26
sirtimid
approved these changes
Sep 3, 2026
sirtimid-ci
approved these changes
Sep 3, 2026
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.
Publishing coverage to GitHub Pages has been failing since the org move:
PUBLISH_DOCS_TOKENis a personal access token belonging to an account with no write access to this repository, so the push togh-pagesis rejected. The same run also warned thatpeaceiris/actions-gh-pagesis pinned to a version running on the deprecated node20 runtime.Reissuing the token would fix the symptom and leave the shape intact: a long-lived credential, held by a bot account, granting write access to the repository so that a job can copy 663 static files into a branch. Deploying through the Pages API instead removes the need for one. The job trades
contents: writeforpages: write, so it can no longer write to any branch — includingmain— and there is nothing left to rotate.Changes
peaceiris/actions-gh-pageswithactions/upload-pages-artifactandactions/deploy-pages. The artifact is staged under_site/coverage, so the served path, whichcoverage-report.ymlderives fromgithub.repository_owner, is unchanged.pages: writeandid-token: write, and widen thepublish-coveragecaller inmain.ymlto match. A called workflow's jobs cannot request more than the caller grants.PUBLISH_DOCS_TOKENand the now-meaninglesspublish_dirinput.Testing
actionlintpasses. The deploy path itself only runs on a push tomain, so it cannot be exercised from a pull request; the first merge is the test. Verify afterwards thatcoverage/coverage-summary.jsonis served from the Pages URL, and that a subsequent pull request's coverage report shows trend indicators rather than warning that no baseline was found.This depends on the repository's Pages source being set to GitHub Actions rather than "Deploy from a branch"; that is already done, and the API now reports
build_type: workflow. The existinggh-pagesbranch becomes vestigial and can be deleted once a deployment succeeds.🤖 Generated with Claude Code