ci(validate): stub required env vars so build-time analyse passes
Validate / validate (push) Successful in 29s
Deploy to LXC / deploy (push) Failing after 2m27s

src/lib/server/env.ts validates DATABASE_URL, SESSION_SECRET,
STORAGE_SIGNING_SECRET, and PUBLIC_BASE_URL with Zod and throws
when missing. SvelteKit's analyse step imports it during build, so
CI needs values that satisfy the schema shape — they never connect
to anything.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-27 11:11:47 +07:00
parent c43fdc4716
commit 3274afb677
2 changed files with 14 additions and 0 deletions
+7
View File
@@ -28,4 +28,11 @@ jobs:
run: pnpm install --frozen-lockfile run: pnpm install --frozen-lockfile
- name: Run validation (svelte-check + build) - name: Run validation (svelte-check + build)
# Stub env so the build-time analyse step can import src/lib/server/env.ts
# without connecting to anything. Values match the Zod schema's shape only.
env:
DATABASE_URL: postgres://ci:ci@localhost:5432/ci
SESSION_SECRET: 0000000000000000000000000000000000000000000000000000000000000000
STORAGE_SIGNING_SECRET: 0000000000000000000000000000000000000000000000000000000000000000
PUBLIC_BASE_URL: http://localhost:5173
run: pnpm run validate run: pnpm run validate
+7
View File
@@ -28,4 +28,11 @@ jobs:
run: pnpm install --frozen-lockfile run: pnpm install --frozen-lockfile
- name: Run validation (svelte-check + build) - name: Run validation (svelte-check + build)
# Stub env so the build-time analyse step can import src/lib/server/env.ts
# without connecting to anything. Values match the Zod schema's shape only.
env:
DATABASE_URL: postgres://ci:ci@localhost:5432/ci
SESSION_SECRET: 0000000000000000000000000000000000000000000000000000000000000000
STORAGE_SIGNING_SECRET: 0000000000000000000000000000000000000000000000000000000000000000
PUBLIC_BASE_URL: http://localhost:5173
run: pnpm run validate run: pnpm run validate