Compare commits

..
Author SHA1 Message Date
aarbitandClaude Sonnet 5 71e4c2c22d Pin wrangler and supabase CLI as devDependencies
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
The last pipeline run failed on \`npx wrangler deploy\` with npm unable to
find wrangler@4.144.0 — a transient registry propagation gap right after
that version's release, not an actual config problem (it installs fine
moments later, confirmed locally). Both wrangler and the supabase CLI were
being fetched fresh via bare npx on every single pipeline run instead of
coming from the lockfile like every other dependency, which is exactly
what left CI exposed to whatever npm's registry happens to be doing at
that moment. Pinning them means npm ci resolves the exact locked version
every time, and npx picks up the local install instead of hitting the
registry at all.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017DUU6CnxECCDeqDNYJgr5x
2026-09-29 16:35:36 -05:00
aarbitandClaude Sonnet 5 dd78b45c3e Fix marketing site's Log in/Sign up links pointing to prod on staging
ci/woodpecker/push/woodpecker Pipeline failed
site/ has no build step (served as-is, no per-environment templating), so
its three app links were hardcoded to https://app.diagrav.com/ in the
markup — meaning staging.diagrav.com was sending visitors to the production
app instead of staging-app.diagrav.com. Rewrites them at load time based on
location.hostname instead of maintaining a second copy of the file;
defaults to the production app host everywhere except the exact staging
hostname, so production's own links are unaffected.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017DUU6CnxECCDeqDNYJgr5x
2026-09-29 16:12:14 -05:00
aarbitandClaude Sonnet 5 a0d62587de Add explicit event filters to install/lint/typecheck steps
ci/woodpecker/push/woodpecker Pipeline was successful
Woodpecker's linter flags steps with no event filter as a "bad habit" (they'd
otherwise run on every event type, including ones added to Woodpecker in the
future). Scoped to [push, deployment] specifically — not just push — since a
production deploy re-runs the whole pipeline as a deployment event, and
deploy-production's build needs these steps (especially install's node_modules)
to have actually run first.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017DUU6CnxECCDeqDNYJgr5x
2026-09-29 15:52:35 -05:00
aarbitandClaude Sonnet 5 7fbe53f025 Fix Woodpecker event name: deployment, not deploy
ci/woodpecker/push/woodpecker Pipeline was successful
Caught from the linter warnings on the first real pipeline run (#1) — the
production-promotion step's event filter used \`deploy\`, an invalid event
name, so it would never have matched Woodpecker's actual deploy-button
event (\`deployment\`) and the production step would have silently never
run. Staging's own deploy (a push-triggered step) was unaffected and
verified working on that same run.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017DUU6CnxECCDeqDNYJgr5x
2026-09-29 15:49:44 -05:00
5 changed files with 1800 additions and 9 deletions
+14 -3
View File
@@ -5,8 +5,8 @@
# Supabase project — never shares data with production). Production is
# never touched automatically — promoting to it is a manual "Deploy" button
# click on a main-branch pipeline run in the Woodpecker UI (Woodpecker's
# deploy event), which is why deploy-production is gated on `event: deploy`
# rather than `event: push`.
# deployment event), which is why deploy-production is gated on
# `event: deployment` rather than `event: push`.
#
# Debian-based node image (not Alpine) for every step: the Supabase CLI's
# downloaded binary has had musl/Alpine compatibility issues in the past.
@@ -14,18 +14,29 @@
# `npm ci` in the install step is enough for every later step to reuse.
steps:
# Explicit event filter on these three (rather than the no-`when` default,
# which runs on every event Woodpecker knows about) because a deploy-time
# re-run of this pipeline is a `deployment` event, not `push` — install
# has to fire there too, or deploy-production's `npm run build` would run
# with no node_modules.
- name: install
image: node:22-bookworm
when:
- event: [push, deployment]
commands:
- npm ci
- name: lint
image: node:22-bookworm
when:
- event: [push, deployment]
commands:
- npm run lint
- name: typecheck
image: node:22-bookworm
when:
- event: [push, deployment]
commands:
- npx tsc -b
@@ -58,7 +69,7 @@ steps:
- name: deploy-production
image: node:22-bookworm
when:
- event: deploy
- event: deployment
branch: main
evaluate: 'CI_PIPELINE_DEPLOY_TARGET == "production"'
environment:
+1 -1
View File
@@ -121,7 +121,7 @@ revisited and simplified to auto-deploy staging instead.
**Actual flow**: any push (any branch) runs lint + typecheck, then
auto-deploys to a shared staging environment — no button needed. Production
is never touched automatically; promoting to it is a manual **Deploy**
button click (Woodpecker's built-in deploy event) on a `main`-branch
button click (Woodpecker's built-in `deployment` event) on a `main`-branch
pipeline run, typing `production` as the deploy target
(`$CI_PIPELINE_DEPLOY_TARGET`). Requires **"Allow deployments"** enabled in
the repo's Woodpecker project settings.
+1763 -1
View File
File diff suppressed because it is too large Load Diff
+3 -1
View File
@@ -28,8 +28,10 @@
"@types/uuid": "^10.0.0",
"@vitejs/plugin-react": "^6.1.0",
"oxlint": "^1.79.0",
"supabase": "^2.118.0",
"tailwindcss": "^4.3.3",
"typescript": "~6.0.2",
"vite": "^8.2.2"
"vite": "^8.2.2",
"wrangler": "^4.143.1"
}
}
+19 -3
View File
@@ -24,8 +24,8 @@
<a href="#library">Library</a>
</div>
<div class="nav-auth">
<a class="nav-login" href="https://app.diagrav.com/">Log in</a>
<a class="btn btn-primary btn-sm" href="https://app.diagrav.com/">Sign up</a>
<a class="nav-login app-link" href="https://app.diagrav.com/">Log in</a>
<a class="btn btn-primary btn-sm app-link" href="https://app.diagrav.com/">Sign up</a>
</div>
</div>
</div>
@@ -158,7 +158,7 @@
<div class="strip">
<h2>Stop guessing which cable you need</h2>
<p>Plan the wiring first. Buy the right cables once.</p>
<a class="btn btn-primary btn-lg strip-cta" href="https://app.diagrav.com/">Sign up</a>
<a class="btn btn-primary btn-lg strip-cta app-link" href="https://app.diagrav.com/">Sign up</a>
</div>
</div>
</section>
@@ -170,5 +170,21 @@
</div>
</footer>
<script>
// site/ has no build step (served as-is, no per-environment templating),
// so the app links above are hardcoded to production in the markup —
// this is the one place that needs to differ on staging.diagrav.com,
// rewritten at load time rather than maintaining a second copy of this
// file. Defaults to production's app host for anything else (the real
// domain, a bare file preview, etc.) — the safe assumption everywhere
// that isn't specifically the staging hostname.
(function () {
var appHost = location.hostname === 'staging.diagrav.com' ? 'staging-app.diagrav.com' : 'app.diagrav.com';
document.querySelectorAll('.app-link').forEach(function (a) {
a.href = 'https://' + appHost + '/';
});
})();
</script>
</body>
</html>