Commitffad5aaunknown_key
fix(admin-deploys): default to ccantynz-alt on GitHub (was 404ing)
fix(admin-deploys): default to ccantynz-alt on GitHub (was 404ing) The "Deploy" button on /admin/self-host dispatches the hetzner-deploy.yml workflow via GitHub Actions. Defaulted the GitHub repo to "ccantynz/Gluecron.com" — but GitHub knows the mirror as "ccantynz-alt/Gluecron.com". Result: every click returned 'github responded 404: Not Found' from GitHub's API. Fix: default the body.repo to ccantynz-alt/Gluecron.com (the GitHub mirror name). Add an optional GITHUB_DEPLOY_REPO env override so the default can be changed without a code deploy if the mirror moves. Test updated to match the new (correct) default + explanatory comment so this doesn't get reverted by someone thinking the rename was wrong.
2 files changed+13−2ffad5aaea64fbd34e1df031b36f3280fa49288c4
2 changed files+13−2
Modifiedsrc/__tests__/cli-deploy.test.ts+5−1View fileUnifiedSplit
@@ -537,7 +537,11 @@ describe("/admin/deploys/trigger", () => {
537537 expect(res.status).toBe(200);
538538 const body = await res.json();
539539 expect(body.ok).toBe(true);
540 expect(body.repo).toBe("ccantynz/Gluecron.com");
540 // Default repo is the GitHub-side mirror (`ccantynz-alt`), NOT the
541 // Gluecron-side name (`ccantynz`). GitHub doesn't know `ccantynz`,
542 // so dispatching to that returned 404 in production until we fixed
543 // the default. See src/routes/admin-deploys.tsx for the comment.
544 expect(body.repo).toBe("ccantynz-alt/Gluecron.com");
541545 expect(body.workflow).toBe("hetzner-deploy.yml");
542546 expect(body.ref).toBe("main");
543547 expect(captured).not.toBeNull();
Modifiedsrc/routes/admin-deploys.tsx+8−1View fileUnifiedSplit
@@ -88,7 +88,14 @@ admin.post("/admin/deploys/trigger", async (c) => {
8888 } catch {
8989 body = {};
9090 }
91 const repo = String(body.repo || "ccantynz/Gluecron.com");
91 // GitHub repo for the deploy workflow. NOT the same as Gluecron's
92 // canonical name (`ccantynz/Gluecron.com`) — GitHub knows the mirror
93 // as `ccantynz-alt/Gluecron.com`. Default to the GitHub-side path so
94 // the "Deploy" button doesn't 404. Override via the request body if
95 // the mirror ever moves. (Env override available via GITHUB_DEPLOY_REPO.)
96 const repo = String(
97 body.repo || process.env.GITHUB_DEPLOY_REPO || "ccantynz-alt/Gluecron.com"
98 );
9299 const workflow = String(body.workflow || "hetzner-deploy.yml");
93100 const ref = String(body.ref || "main");
94101 const [owner, name] = repo.split("/");
95102