Skip to content

Commit 73bae66

Browse files
Paul Mulliganclaude
andcommitted
ci: gate doc coverage + package exports, generate API reference in docs build
Widget CI now runs 'pnpm docs:api:check' (fails on any undocumented public export or broken @link) and 'pnpm check:exports' (publint + attw) after the build. The Docs workflow installs the widget and runs 'pnpm docs:api' before building so the generated HTML reference ships with the Cloudflare Pages deploy, and now also triggers on widget/** changes so the reference rebuilds when the public API changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 54022a6 commit 73bae66

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,18 @@ jobs:
4242
- name: Type check
4343
run: pnpm typecheck
4444

45+
- name: API docs coverage (TSDoc)
46+
run: pnpm docs:api:check
47+
4548
- name: Test (Vitest)
4649
run: pnpm test
4750

4851
- name: Build
4952
run: pnpm build
5053

54+
- name: Validate package exports (attw + publint)
55+
run: pnpm check:exports
56+
5157
worker:
5258
name: Validate Worker
5359
runs-on: ubuntu-latest

.github/workflows/docs.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ on:
55
branches: [main]
66
paths:
77
- "docs/**"
8+
- "widget/**"
89
- ".github/workflows/docs.yml"
910
pull_request:
1011
branches: [main]
1112
paths:
1213
- "docs/**"
14+
- "widget/**"
1315
- ".github/workflows/docs.yml"
1416
workflow_dispatch:
1517

@@ -40,6 +42,17 @@ jobs:
4042
- name: Install dependencies
4143
run: pnpm install --frozen-lockfile
4244

45+
# The hosted API reference is generated from the widget's TSDoc and copied
46+
# into docs/public/api by the docs build (scripts/copy-api.mjs). Generate
47+
# it here first so it ships with this deploy.
48+
- name: Install widget dependencies
49+
working-directory: widget
50+
run: pnpm install --frozen-lockfile
51+
52+
- name: Generate API reference (TypeDoc)
53+
working-directory: widget
54+
run: pnpm docs:api
55+
4356
- name: Build (includes Pagefind index)
4457
run: pnpm build
4558

0 commit comments

Comments
 (0)