ci: add per-PR website preview workflow#1058
Draft
benbellick wants to merge 6 commits into
Draft
Conversation
|
Preview: https://substrait.io/preview/1058/ |
benbellick
commented
Apr 23, 2026
| - "site/**" | ||
| - "extensions/**" | ||
| - "text/**" | ||
| - ".github/workflows/pr-preview.yml" |
Member
Author
There was a problem hiding this comment.
This is there so that we could test it on changes to this file.
benbellick
commented
Apr 28, 2026
| run: | | ||
| if [ -d "preview/$PR" ]; then | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "41898282+github-actions[bot]@users.noreply.github.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 a workflow that builds the site on each PR and publishes it to
https://substrait.io/pr-preview/pr-<N>/so reviewers can see rendered changes before merging. Deploys are scoped to a subdirectory withkeep_files: trueso sibling previews and the production site root aren't disturbed. Closing a PR removes its preview directory and deletes the sticky comment.Reuses the existing
SUBSTRAIT_SITE_DEPLOY_KEY, so no new secrets are needed. As a consequence, fork PRs are skipped since GitHub doesn't expose secrets to fork-triggered workflows; adding fork support would require theworkflow_runtwo-workflow pattern and is left as a follow-up.Pushes to
mainstill overwrite the external repo root and will remove any active previews. Re-running this workflow from the Actions tab restores the preview for an open PR.Note: This PR was developed with AI assistance. All changes have been reviewed, and I take full responsibility for this contribution.
This change is