Skip to content

Commit e48012e

Browse files
Mlaz-codeclaude
andcommitted
ci: typecheck before Vercel build
Adds `pnpm typecheck` (tsc --noEmit) as a step before the Next build in both deploy-dev.yml and deploy-prod.yml. next build runs its own type check but only for files reachable from routes — this catches type drift in shared utils, unused helpers, and MDX page scripts that the route-traversal check doesn't touch. Currently passes cleanly; future regressions fail the workflow before Vercel does its own build. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7bb59a2 commit e48012e

3 files changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/deploy-dev.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ jobs:
3737

3838
- run: pnpm install --frozen-lockfile
3939

40+
- name: Typecheck
41+
run: pnpm typecheck
42+
4043
- name: Build
4144
run: pnpm build
4245

.github/workflows/deploy-prod.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ jobs:
4848

4949
- run: pnpm install --frozen-lockfile
5050

51+
- name: Typecheck
52+
# `next build` performs its own tsc-equivalent pass, but only
53+
# for files reachable from routes. This runs tsc against the
54+
# whole repo so MDX page scripts, shared utils, and unused
55+
# helpers don't drift types.
56+
run: pnpm typecheck
57+
5158
- name: Build
5259
run: pnpm build
5360

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"scripts": {
77
"dev": "next dev -H 0.0.0.0 -p 3002",
88
"build": "next build && node scripts/fix-locale-links.mjs && pagefind --site out --output-subdir _pagefind",
9-
"start": "next start"
9+
"start": "next start",
10+
"typecheck": "tsc --noEmit"
1011
},
1112
"dependencies": {
1213
"next": "^16.1.6",

0 commit comments

Comments
 (0)