Build PR previews without maintainer approval - #1806
Draft
st0012 wants to merge 4 commits into
Draft
Conversation
Contributor
|
Thanks! Nice way to preview changes |
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.
Fork previews currently pause each fork update in
fork-preview-protectionuntil a maintainer approves the environment deployment. This creates repeated approval requests, delays contributor feedback, and fills the Actions UI with waiting jobs.This change removes the preview-specific maintainer approval step. Every PR builds RDoc in a read-only workflow that has no secrets. A trusted
workflow_runmatches the_siteartifact to the current PR head and rejects non-static Pages controls.flowchart LR subgraph untrusted["Untrusted PR workflow — no secrets"] PR["PR opened or updated"] Build["Build RDoc automatically<br/>No preview approval gate"] Artifact["Upload _site artifact"] PR --> Build --> Artifact end subgraph trusted["Trusted repository workflow"] Validate{"Current PR and SHA?<br/>Static artifact only?"} Stop["Stop"] Deploy["Deploy to Cloudflare Pages"] Comment["Update one preview comment"] Validate -->|No| Stop Validate -->|Yes| Deploy --> Comment end Artifact --> Validate Secrets[("Cloudflare secrets")] --> DeployContributors now receive an updated preview after each successful commit. Per-PR concurrency cancels older work, and one bot comment points to the latest successful preview. Maintainers no longer open individual environment deployments or receive repeated preview approval requests.
The trusted workflow exposes the Cloudflare token only to the deployment step. It does not download the PR repository or run PR code. GitHub's separate public-fork policy can still hold workflows from contributors who are new to GitHub. Existing PRs can retain the old MATZBOT comment once. Later deployments update only the new GitHub Actions comment.