Skip to content

Commit 840e11a

Browse files
sametbasbugclaude
andcommitted
Send the production deploy back through push
Production has a full pipeline in deploy-production.yml and a local shortcut that bypasses it. Today both ran against the same commit, which made the gap easy to read side by side: the workflow version carries `main-90f59f6b9c2c`, the local one carries no tag at all and shows up as "Unknown (deployment)". The tag is the smallest of the differences. The local path also skips the four verification jobs agreeing on a scope before deploy is allowed to run, the SHA256 manifest of the artifact, the commit-identity check at deploy time, `d1 migrations apply`, binding the secrets to the version, and the post-deploy health, header and live-contract checks. `npm run production:deploy` now prints that list and exits 1. It is a sign, not a lock — the production API token lives on this machine, so anyone typing `wrangler deploy` by hand can still reach Cloudflare. Making it a real lock means moving the token into Actions only, which is Samet's call. Staging is unchanged and stays local: it has no workflow. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 90f59f6 commit 840e11a

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

‎package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"worker:assets:production:live": "ORBIT_SITE_URL=https://orbit.sametbasbug.dev ORBIT_NOINDEX=false astro build --config astro.worker.config.mjs",
2323
"worker:bundle:production:live": "wrangler deploy --dry-run --config wrangler.production.live.jsonc --outdir dist/worker-production-live",
2424
"worker:build:production:live": "npm run worker:assets:production:live && npm run worker:bundle:production:live",
25+
"production:deploy": "node scripts/orbit-production-deploy-guard.mjs",
2526
"worker:build:production:dark-launch": "ORBIT_SITE_URL=https://orbit-v6-production.samett33710.workers.dev ORBIT_NOINDEX=true astro build --config astro.worker.config.mjs && node scripts/orbit-staging-assets.mjs && wrangler deploy --dry-run --config wrangler.production.dark-launch.jsonc --outdir dist/worker-production-dark-launch",
2627
"worker:dev": "node scripts/orbit-local-dev.mjs",
2728
"d1:migrate:local": "wrangler d1 migrations apply orbit-v6-local --local",
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Production'a çıkaran şey `main`'e push.
3+
*
4+
* Bu betik dağıtım yapmaz; dağıtım komutu arayan kişiyi doğru yola gönderir
5+
* ve sıfırdan farklı bir kodla çıkar. Yerel `wrangler deploy` gerçekten
6+
* çalışıyor — tehlikeli olan tam olarak bu, çünkü çalışırken atladıklarını
7+
* söylemiyor.
8+
*
9+
* Bu bir kilit değil, bir tabela: token bu makinede durduğu sürece elle
10+
* `npx wrangler deploy` yazan biri yine dağıtabilir. Kilit, token'ın yalnız
11+
* Actions'ta durması olurdu.
12+
*/
13+
const message = `
14+
Orbit production'a push ile çıkar.
15+
16+
git push origin main
17+
18+
.github/workflows/deploy-production.yml dağıtır. Yerel "wrangler deploy"
19+
kullanma; şunları atlıyor:
20+
21+
- dört doğrulama işinin bağımsız scope sınıflandırması ve mutabakatı
22+
- artefaktın SHA256 manifesti ve deploy anında commit kimliği teyidi
23+
- d1 migrations apply (yerel yolda göç hiç uygulanmıyor)
24+
- sırların --secrets-file ile sürüme bağlanması
25+
- --tag main-<sha> (etiketsiz sürüm hangi kodun canlıda olduğunu söylemez)
26+
- dağıtım sonrası canlı sağlık, header ve contract:live doğrulaması
27+
28+
Koşuyu izlemek için: gh run watch <id> --exit-status
29+
30+
Staging ayrı ve yerel: npm run staging:deploy && npm run staging:verify
31+
`;
32+
33+
process.stderr.write(`${message.trim()}\n`);
34+
process.exit(1);

0 commit comments

Comments
 (0)