Skip to content

ci: add per-PR website preview workflow#1058

Draft
benbellick wants to merge 6 commits into
mainfrom
ci/pr-preview-workflow
Draft

ci: add per-PR website preview workflow#1058
benbellick wants to merge 6 commits into
mainfrom
ci/pr-preview-workflow

Conversation

@benbellick
Copy link
Copy Markdown
Member

@benbellick benbellick commented Apr 23, 2026

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 with keep_files: true so 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 the workflow_run two-workflow pattern and is left as a follow-up.

Pushes to main still 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 Reviewable

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 23, 2026

Preview: https://substrait.io/preview/1058/
Updated for 3c8cf3c

- "site/**"
- "extensions/**"
- "text/**"
- ".github/workflows/pr-preview.yml"
Copy link
Copy Markdown
Member Author

@benbellick benbellick Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is there so that we could test it on changes to this file.

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"
Copy link
Copy Markdown
Member Author

@benbellick benbellick Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant