From 600fb4101206f54d1fe17f8476b643b307bf0ac1 Mon Sep 17 00:00:00 2001 From: Julian Sommer <115516918+juliansommer@users.noreply.github.com> Date: Thu, 15 Oct 2026 11:21:35 +1000 Subject: [PATCH] fix(ci): fail UI CI when the committed dist differs from a clean build --- .github/workflows/ui.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ui.yml b/.github/workflows/ui.yml index ef08a46a7..3781df04d 100644 --- a/.github/workflows/ui.yml +++ b/.github/workflows/ui.yml @@ -58,5 +58,14 @@ jobs: - name: Build Frontend run: pnpm build + # spx embeds the committed dist/, so a bundle that differs from a clean + # build of this source would ship JavaScript CI never built. Porcelain + # rather than git diff, so added and deleted chunks count too. - name: Check for generated file drift - run: git diff --exit-code -- src/routeTree.gen.ts src/lib/cn-tables.gen.ts + run: | + drift=$(git status --porcelain -- src/routeTree.gen.ts src/lib/cn-tables.gen.ts dist) + if [ -n "$drift" ]; then + echo "::error::Generated files differ from a clean build. Run pnpm build and commit the result." + echo "$drift" + exit 1 + fi