Skip to content

ci: auto-deploy kernelcad.com on merge to develop#580

Merged
w1ne merged 1 commit into
developfrom
ci/auto-deploy-marketing
Jul 4, 2026
Merged

ci: auto-deploy kernelcad.com on merge to develop#580
w1ne merged 1 commit into
developfrom
ci/auto-deploy-marketing

Conversation

@w1ne

@w1ne w1ne commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Problem

The kernelcad.com marketing deploy (deploy-kernelcad-com.yml in the private kernelCAD-server) is workflow_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 requires lint + build-and-checks + test, a push to develop = a PR that passed CI was merged → this fires on merge + CI pass. app.kernelcad.com already auto-deploys on develop push; kernelcad.com now matches. workflow_dispatch kept 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.

⚠️ One-time setup (repo admin)

Add repo secret MARKETING_DEPLOY_TOKEN = a fine-grained PAT with Actions: Read and write on w1ne/kernelCAD-server. The default GITHUB_TOKEN can'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.

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.
@w1ne w1ne merged commit 5558cff into develop Jul 4, 2026
17 checks passed
@w1ne w1ne deleted the ci/auto-deploy-marketing branch July 4, 2026 20:47
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.

1 participant