Skip to content

Commit 75fd5bd

Browse files
KyleAMathewsclaude
andcommitted
ci: improve documentation sync check error message
Update check-docs job to provide clear step-by-step instructions when generated docs are out of sync. The updated error message now explicitly shows that builds must happen before doc generation: 1. pnpm install 2. pnpm build (generates .d.ts files needed for docs) 3. pnpm docs:generate (uses built declaration files) This makes it clear that docs are generated from built TypeScript declaration files, not directly from source. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 30af215 commit 75fd5bd

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/pr.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,31 @@ jobs:
9090
run: |
9191
cd examples/react/projects
9292
pnpm build
93+
check-docs:
94+
name: Check Generated Docs
95+
runs-on: ubuntu-latest
96+
steps:
97+
- name: Checkout
98+
uses: actions/[email protected]
99+
- name: Setup Tools
100+
uses: tanstack/config/.github/setup@main
101+
- name: Build Packages
102+
run: pnpm run build
103+
- name: Generate Docs
104+
run: pnpm docs:generate
105+
- name: Check for changes
106+
run: |
107+
if [ -n "$(git status --porcelain)" ]; then
108+
echo "Error: Generated docs are out of sync!"
109+
echo ""
110+
echo "Please run the following commands locally and commit the changes:"
111+
echo " 1. pnpm install"
112+
echo " 2. pnpm build"
113+
echo " 3. pnpm docs:generate"
114+
echo " 4. git add docs/"
115+
echo " 5. git commit -m 'docs: regenerate API documentation'"
116+
echo ""
117+
echo "Files that need to be updated:"
118+
git status --short
119+
exit 1
120+
fi

0 commit comments

Comments
 (0)