Deploy to production on merge to main - #16
Open
blindtechmage wants to merge 1 commit into
Open
Conversation
Extends the existing CI workflow to also trigger on push to main, and adds a deploy job that runs a real wrangler deploy (promoting the new version to the Active Deployment, unlike the PR preview workflow's versions upload) once lint, unit tests, build/HTML-lint, and the accessibility/E2E suite all pass against main itself. Closes the "no deploy-on-merge workflow" gap flagged after the contact-form provisioning work — main and production had been able to drift apart with no automated way to reconcile them. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
🔍 Preview deployment: https://09848de4-blindtechmage-website.blindtechmage.workers.dev |
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
ci.ymlto also trigger onpushtomain(previouslypull_requestonly).deployjob that runs a realwrangler deploy(promotes the new version to the Active Deployment, unlike the PR preview workflow'sversions upload), gated behindlint,unit-tests,build-and-html-lint, andaccessibility-e2eall passing againstmainitself — not just trusting that the PR's own checks were green before merge.CLOUDFLARE_API_KEYsecret,CLOUDFLARE_ACCOUNT_IDvariable, andPUBLIC_RECAPTCHA_SITE_KEYvariable already wired up for PR previews.Closes the "no deploy-on-merge workflow" gap — until now,
mainand the live production Worker could drift apart with no automated way to reconcile them (confirmed firsthand after the last PR: the contact form'sRATE_LIMITbinding and current pages were merged tomainbut not live in production).Notes
mainis the first real test of thedeployjob — it can't be exercised any other way (nopushevent fires until it's actually onmain).Test plan
npm run typechecknpm run lint(js + markdown)js-yamlmain)