Files
oh-my-opencode/.github/workflows/web-ci.yml
T
YeonGyu-Kim 65fc0d9434 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.
2026-05-08 16:46:05 +09:00

58 lines
1.2 KiB
YAML

name: Web CI
on:
push:
branches: [master, dev]
paths:
- "web/**"
- "docs/**"
- ".github/workflows/web-ci.yml"
pull_request:
branches: [master, dev]
paths:
- "web/**"
- "docs/**"
- ".github/workflows/web-ci.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
format-lint-typecheck-build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.12"
- 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
- name: Lint
run: bun run lint
- name: Type check
run: bun run type-check
- name: Next build
run: bun run build
env:
NEXT_TELEMETRY_DISABLED: "1"
- name: OpenNext (Cloudflare) build
run: bunx opennextjs-cloudflare build
env:
NEXT_TELEMETRY_DISABLED: "1"