chore: publish HTML previews of PRs to GitHub Pages - #15
Merged
Conversation
|
📄 Editor's Copy preview Preview of 6860f8a; updated on every push. For review only — the official specifications are published at https://openid.net/specs/ |
Serve the site from a gh-pages branch instead of actions/deploy-pages: main's Editor's Copy at the root, and each PR's rendered HTML under PREVIEW-DO-NOT-USE/pr-<N>/, linked from a sticky PR comment and removed when the PR closes. Same model as the openid/publication repo. Fork PRs get no preview (read-only token). The checkout-or-create, commit-if-changed, retry-push sequence is shared by all three jobs via tools/publish-gh-pages.sh. gh-pages is fetched shallow (it grows a site snapshot per publish) with an explicit refspec (actions/checkout configures only the triggering ref, so a bare fetch would give checkout nothing to resolve gh-pages against). The sticky comment is matched on a hidden HTML marker rather than its visible heading, and the preview URL is derived from the repo context. The repo's Pages source has already been switched to the gh-pages branch, seeded with main's current Editor's Copy. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Adds IETF-style HTML previews for pull requests, following the model used in openid/publication (and IETF repos such as oauth-wg/oauth-first-party-apps):
actions/deploy-pagesto a gh-pages branch: main's Editor's Copy is published at the branch root, and each PR's rendered HTML is pushed toPREVIEW-DO-NOT-USE/pr-<N>/.buildjob'ssiteartifact is reused for the preview, so the spec is only rendered once per run.preview-cleanup.ymlworkflow deletes the preview directory when the PR is closed or merged.GITHUB_TOKENis read-only), matching the usual limitation of this approach.The repo's Pages source has already been switched to the
gh-pagesbranch, and the branch root was seeded with the current main Editor's Copy, so https://openid.github.io/dchp/ continues to serve and the preview comment below works now (see it in action on this PR). One consequence: until this PR merges, a push to main would fail in the oldpublish-to-pagesjob (actions/deploy-pagesno longer matches the Pages configuration) — merging this fixes that.🤖 Generated with Claude Code