From 65fc0d943416a3e0757102291d54401f09027b4c Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Fri, 8 May 2026 16:46:05 +0900 Subject: [PATCH] ci: generate docs content before web checks; bun prepare hook for local dev The first build of #3860 failed at type-check because the generated `lib/docs-content.generated.ts` is gitignored (regenerated on every build) and CI's `type-check` step runs before `build`. Two fixes: - web-ci.yml: explicit `Generate docs content from repo-root docs/` step right after `bun install` so format-check, lint, and type-check all see the file. - web/package.json: add `prepare` lifecycle script. `bun install` invokes it automatically, so a fresh local checkout boots into a working state too. Build still re-runs the generator via prebuild, so docs/ edits land in the bundle without an explicit dev action. --- .github/workflows/web-ci.yml | 3 +++ web/package.json | 1 + 2 files changed, 4 insertions(+) diff --git a/.github/workflows/web-ci.yml b/.github/workflows/web-ci.yml index f3c0c9d3e..9007b399d 100644 --- a/.github/workflows/web-ci.yml +++ b/.github/workflows/web-ci.yml @@ -34,6 +34,9 @@ jobs: - name: Install dependencies run: bun install --frozen-lockfile + - name: Generate docs content from repo-root docs/ + run: node ./scripts/generate-docs-content.mjs + - name: Format check run: bun run format:check diff --git a/web/package.json b/web/package.json index 716d184c9..56d1c9583 100644 --- a/web/package.json +++ b/web/package.json @@ -3,6 +3,7 @@ "version": "0.1.0", "private": true, "scripts": { + "prepare": "node ./scripts/generate-docs-content.mjs", "prebuild": "node ./scripts/prepare-build.mjs", "dev": "next dev", "build": "next build",