Repository navigation
Conversation
Post a distinct GitHub status for the side, prompt-first, and agentic deploy previews, then delete those deploys after the pull request closes. Production still publishes through Netlify Git on push to main. Co-authored-by: carlosvin <carlosvin@gmail.com>
✅ Deploy Preview for fullstack-promptable-app-example ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for fullstack-promptable-prompt-first ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for fullstack-promptable-agentic ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Summary
Pull requests already get a Netlify deploy preview for each shell, but GitHub only kept one
deploy/netlifystatus, and those previews stayed online after merge. This adds a workflow that records a separate status per site and deletes the preview deploys when the pull request closes. Production still publishes from Netlify Git on push tomain.What changed
.github/workflows/netlify-previews.ymlpolls the Netlify API for the pull request head and postsnetlify/side,netlify/prompt-first, andnetlify/agentic.pull_requestclosed, the same workflow unlocks and deletes those deploy-preview deploys.Required before this works
NETLIFY_AUTH_TOKEN. Without it, the new jobs fail and previews are not deleted.main, Deploy Previews on, branch deploys off.RELEASE_PLEASE_TOKENsecret.Do not add the three
netlify/*contexts to the required ruleset until the secret is set and a pull request shows them green.Test
pnpm exec vitest run scripts/netlify/previewDeploys.test.ts— 4 passed. The test covers preview selection, commit matching, success status posting, and unlock-then-delete. It does not call Netlify or GitHub.