Skip to content

fix(ci): stop PR previews from deploying to production#414

Merged
artberger merged 4 commits into
mainfrom
kkb-cloudflare-deploy-fix
Jul 14, 2026
Merged

fix(ci): stop PR previews from deploying to production#414
artberger merged 4 commits into
mainfrom
kkb-cloudflare-deploy-fix

Conversation

@kristin-kronstain-brown

Copy link
Copy Markdown
Contributor

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), 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.

kristin-kronstain-brown and others added 4 commits July 14, 2026 09:26
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>
@artberger artberger merged commit a63c85e into main Jul 14, 2026
4 checks passed
@artberger artberger deleted the kkb-cloudflare-deploy-fix branch July 14, 2026 13:35
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.

2 participants