fix(ci): stop PR previews from deploying to production#414
Merged
Conversation
bd356de to
1ab33e3
Compare
The Deploy Preview workflow ran `wrangler deploy`, which promotes the new version to 100% live traffic, so every PR was redeploying production. Switch previews to `wrangler versions upload` (uploads an isolated version + preview URL, no traffic shift) and enable preview_urls in wrangler.toml so uploaded versions get a shareable URL. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Kristin Brown <kristin.brown@solo.io>
Also serves as a canary to verify PR previews do not deploy to production: this corrected line should appear on the preview URL but NOT on kagent.dev until this PR merges. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Kristin Brown <kristin.brown@solo.io>
Add --preview-alias (derived from the sanitized PR branch name) to the `versions upload` command so each PR gets a stable preview hostname (<branch>-kagent-website.<subdomain>.workers.dev) that updates in place on every push, instead of a new per-version URL each time. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Kristin Brown <kristin.brown@solo.io>
The Print step now shows the per-version preview URL and the stable branch-alias preview URL, so reviewers get both from the workflow output. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Kristin Brown <kristin.brown@solo.io>
362c6c9 to
41b3a29
Compare
artberger
approved these changes
Jul 14, 2026
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.
The Deploy Preview workflow ran
wrangler deploy, which promotes the new version to 100% live traffic, so every PR was redeploying production. Switch previews towrangler versions upload(uploads an isolated version + preview URL, no traffic shift), add a dedicated Production workflow that deploys only on merge to main / manual dispatch, and enable preview_urls in wrangler.toml so uploaded versions get a shareable URL.