Repository navigation
Add GitHub Pages previews for pull requests - #12
Merged
Merged
Conversation
This branch was successfully deployed
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.
PR builds currently produce a downloadable dashboard but no hosted review page. Add GitHub Pages previews at
pr-preview/pr-<number>/, with a Pages preview check linking to each deployed PR and an index showing the exact built commits.The existing build continues to run the full checks and package its four static files. A separate publisher executes default-branch code after build completions and PR closures. It combines the latest successful main build with previews for all open PRs, including forks, then deploys one Pages site. PR builds retain read-only repository permissions; the publisher reads their artifacts as data and never executes PR code.
Generated snapshots persist on an automatically created
pages-contentbranch. Each publish reconciles all open PRs under a single concurrency group, preserving production and other previews across updates, retaining previous successful builds when new builds fail, and removing closed PRs. Preview artifacts are validated for expected files, regular-file types, duplicate/path violations, and bounded sizes before installation. Source build artifacts are retained for 30 days; published snapshots survive artifact expiry.Pages stays configured with GitHub Actions as its source, and the
github-pagesenvironment remains restricted tomain. No extra service or secret is required. This infrastructure PR must merge before the trusted publishing workflow can run; its first deployment can pick up existing successful artifacts for PRs #10 and #11 while those feature PRs remain open.Validation:
python3 -m tests.checkpasses: 70 Python tests, 103 JavaScript tests, and the public browser suite.actionlintpasses for both workflows.Actual Pages deployment and the resulting PR check links are verified after this workflow reaches
main.