Compare commits
5
Commits
d847a0f255
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e4c36e2960 | ||
|
|
71e4c2c22d | ||
|
|
dd78b45c3e | ||
|
|
a0d62587de | ||
|
|
7fbe53f025 |
+14
-3
@@ -5,8 +5,8 @@
|
|||||||
# Supabase project — never shares data with production). Production is
|
# Supabase project — never shares data with production). Production is
|
||||||
# never touched automatically — promoting to it is a manual "Deploy" button
|
# never touched automatically — promoting to it is a manual "Deploy" button
|
||||||
# click on a main-branch pipeline run in the Woodpecker UI (Woodpecker's
|
# 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`
|
# deployment event), which is why deploy-production is gated on
|
||||||
# rather than `event: push`.
|
# `event: deployment` rather than `event: push`.
|
||||||
#
|
#
|
||||||
# Debian-based node image (not Alpine) for every step: the Supabase CLI's
|
# Debian-based node image (not Alpine) for every step: the Supabase CLI's
|
||||||
# downloaded binary has had musl/Alpine compatibility issues in the past.
|
# 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.
|
# `npm ci` in the install step is enough for every later step to reuse.
|
||||||
|
|
||||||
steps:
|
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
|
- name: install
|
||||||
image: node:22-bookworm
|
image: node:22-bookworm
|
||||||
|
when:
|
||||||
|
- event: [push, deployment]
|
||||||
commands:
|
commands:
|
||||||
- npm ci
|
- npm ci
|
||||||
|
|
||||||
- name: lint
|
- name: lint
|
||||||
image: node:22-bookworm
|
image: node:22-bookworm
|
||||||
|
when:
|
||||||
|
- event: [push, deployment]
|
||||||
commands:
|
commands:
|
||||||
- npm run lint
|
- npm run lint
|
||||||
|
|
||||||
- name: typecheck
|
- name: typecheck
|
||||||
image: node:22-bookworm
|
image: node:22-bookworm
|
||||||
|
when:
|
||||||
|
- event: [push, deployment]
|
||||||
commands:
|
commands:
|
||||||
- npx tsc -b
|
- npx tsc -b
|
||||||
|
|
||||||
@@ -58,7 +69,7 @@ steps:
|
|||||||
- name: deploy-production
|
- name: deploy-production
|
||||||
image: node:22-bookworm
|
image: node:22-bookworm
|
||||||
when:
|
when:
|
||||||
- event: deploy
|
- event: deployment
|
||||||
branch: main
|
branch: main
|
||||||
evaluate: 'CI_PIPELINE_DEPLOY_TARGET == "production"'
|
evaluate: 'CI_PIPELINE_DEPLOY_TARGET == "production"'
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
+1
-1
@@ -121,7 +121,7 @@ revisited and simplified to auto-deploy staging instead.
|
|||||||
**Actual flow**: any push (any branch) runs lint + typecheck, then
|
**Actual flow**: any push (any branch) runs lint + typecheck, then
|
||||||
auto-deploys to a shared staging environment — no button needed. Production
|
auto-deploys to a shared staging environment — no button needed. Production
|
||||||
is never touched automatically; promoting to it is a manual **Deploy**
|
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
|
pipeline run, typing `production` as the deploy target
|
||||||
(`$CI_PIPELINE_DEPLOY_TARGET`). Requires **"Allow deployments"** enabled in
|
(`$CI_PIPELINE_DEPLOY_TARGET`). Requires **"Allow deployments"** enabled in
|
||||||
the repo's Woodpecker project settings.
|
the repo's Woodpecker project settings.
|
||||||
|
|||||||
Generated
+1763
-1
File diff suppressed because it is too large
Load Diff
+3
-1
@@ -28,8 +28,10 @@
|
|||||||
"@types/uuid": "^10.0.0",
|
"@types/uuid": "^10.0.0",
|
||||||
"@vitejs/plugin-react": "^6.1.0",
|
"@vitejs/plugin-react": "^6.1.0",
|
||||||
"oxlint": "^1.79.0",
|
"oxlint": "^1.79.0",
|
||||||
|
"supabase": "^2.118.0",
|
||||||
"tailwindcss": "^4.3.3",
|
"tailwindcss": "^4.3.3",
|
||||||
"typescript": "~6.0.2",
|
"typescript": "~6.0.2",
|
||||||
"vite": "^8.2.2"
|
"vite": "^8.2.2",
|
||||||
|
"wrangler": "^4.143.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+19
-3
@@ -24,8 +24,8 @@
|
|||||||
<a href="#library">Library</a>
|
<a href="#library">Library</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="nav-auth">
|
<div class="nav-auth">
|
||||||
<a class="nav-login" href="https://app.diagrav.com/">Log in</a>
|
<a class="nav-login app-link" 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="btn btn-primary btn-sm app-link" href="https://app.diagrav.com/">Sign up</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -158,7 +158,7 @@
|
|||||||
<div class="strip">
|
<div class="strip">
|
||||||
<h2>Stop guessing which cable you need</h2>
|
<h2>Stop guessing which cable you need</h2>
|
||||||
<p>Plan the wiring first. Buy the right cables once.</p>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@@ -170,5 +170,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</footer>
|
</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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user