ci: auto-deploy kernelcad.com on merge to develop#580
Merged
Conversation
The marketing site deploy (deploy-kernelcad-com.yml in the private kernelCAD-server) was workflow_dispatch-only, so the live kernelcad.com lagged merged source until someone ran it by hand — which is exactly how a shipped pricing fix sat un-deployed. Add a develop-push-triggered workflow that dispatches that deploy. Per develop branch protection (required checks: lint, build-and-checks, test), a push to develop means a PR that passed CI was merged, so this fires on "merge + CI pass". app.kernelcad.com already auto-deploys this way; kernelcad.com now matches. Manual re-deploy stays available via workflow_dispatch. Requires a one-time repo secret MARKETING_DEPLOY_TOKEN (fine-grained PAT, Actions: read/write on w1ne/kernelCAD-server) — the default GITHUB_TOKEN cannot trigger workflows cross-repo. The deploy + Cloudflare credentials stay owned by the private server repo; this repo only triggers it.
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.
Problem
The kernelcad.com marketing deploy (
deploy-kernelcad-com.ymlin the private kernelCAD-server) isworkflow_dispatch-only. So the live marketing site lags merged source until someone runs it manually — which is how a merged pricing fix sat un-deployed and looked "not fixed".Fix
A
develop-push-triggered workflow here that dispatches that deploy. Since develop's branch protection requireslint+build-and-checks+test, a push to develop = a PR that passed CI was merged → this fires on merge + CI pass.app.kernelcad.comalready auto-deploys on develop push;kernelcad.comnow matches.workflow_dispatchkept for manual re-deploys.Why trigger cross-repo instead of moving the deploy here
The deploy + Cloudflare credentials + Pages bindings stay owned by the private server repo (its existing "single-owned marketing deploy" design, so public-repo pushes can't overwrite the marketing project). This public repo only asks it to run.
Add repo secret
MARKETING_DEPLOY_TOKEN= a fine-grained PAT with Actions: Read and write onw1ne/kernelCAD-server. The defaultGITHUB_TOKENcan't trigger workflows in another repo. Until it's set, the job fails loudly with a clear message (no silent no-op).Note: develop protection doesn't enforce admins, so a direct admin push bypassing a PR would deploy without a fresh CI run; normal PR merges always pass CI first.