-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (56 loc) · 2.38 KB
/
Copy pathci.yml
File metadata and controls
66 lines (56 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# CI floor — modelled on bitbaum/fleet templates/ci/ci-npm.yml.
#
# NB: the deployed application is `app/`, NOT the repo root. The fleet deploy
# registry (fleetcrown/scripts/hetzner/apps.conf) pins
# printcraft|4015|printcraft.orangecat.ch|/home/g/dev/printcraft|app|-
# i.e. APP_DIR=app, so deploy.sh builds in `app/` and ships `app/.next/standalone`.
# The root-level Next tree (root `src/`, `next.config.ts`, `package.json`, …) is a
# stale March-2026 duplicate that nothing builds. CI gates the tree that ships.
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
# A newer push makes the older run obsolete — don't waste minutes finishing it.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
working-directory: app
jobs:
verify:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
# pnpm before setup-node so `cache: pnpm` can find the store.
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v7
with:
# .nvmrc = the version deploy.sh actually builds the standalone bundle on.
node-version-file: .nvmrc
cache: pnpm
cache-dependency-path: app/pnpm-lock.yaml
- name: Install
run: pnpm install --frozen-lockfile
# SSOT: "verified" is defined ONCE, in app/package.json `verify`
# (= lint + typecheck + test), and run identically
# here and locally via `pnpm run verify`. Change the checks in one place.
- name: Verify
run: pnpm run verify
- name: Build
# Hermetic compile. NEXT_PUBLIC_* are baked at build time and the static
# pages construct a Supabase browser client, which throws on missing
# vars — these are fake, non-secret placeholders. No DB is contacted.
env:
NEXT_PUBLIC_SUPABASE_URL: https://placeholder.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY: placeholder-anon-key
SUPABASE_SERVICE_ROLE_KEY: placeholder-service-role-key
run: pnpm run build
- name: Deploy contract — standalone output exists
# deploy.sh aborts with "no standalone output" if next.config.ts ever
# loses `output: "standalone"`. Catch that here, not at deploy time.
run: test -f "$(find .next/standalone -maxdepth 4 -name server.js -not -path '*node_modules*' | head -1)"