Skip to content

Commit 5f4347f

Browse files
committed
fix docs menu link checks
1 parent 2952371 commit 5f4347f

6 files changed

Lines changed: 891 additions & 2 deletions

File tree

.github/workflows/docs-links.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Docs Links
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 9 * * *'
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
docs-links:
13+
name: Docs Links
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18+
with:
19+
persist-credentials: false
20+
21+
- name: Setup Tools
22+
uses: tanstack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3 # main
23+
24+
- name: Check docs menu links
25+
env:
26+
GITHUB_TOKEN: ${{ github.token }}
27+
run: |
28+
set +e
29+
pnpm docs:links:check -- --json docs-menu-link-report.json
30+
status=$?
31+
32+
if [ -f docs-menu-link-report.json ]; then
33+
{
34+
echo "### Docs menu link report"
35+
echo
36+
echo '```json'
37+
cat docs-menu-link-report.json
38+
echo '```'
39+
} >> "$GITHUB_STEP_SUMMARY"
40+
fi
41+
42+
exit $status

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"db:studio": "drizzle-kit studio",
2727
"docs:webhooks:plan": "tsx scripts/sync-docs-webhooks.ts --dry-run",
2828
"docs:webhooks:sync": "tsx scripts/sync-docs-webhooks.ts",
29+
"docs:links:check": "tsx scripts/check-docs-menu-links.ts",
2930
"husky": "pnpm run format && pnpm run test",
3031
"pretest": "pnpm run content:build",
3132
"test": "run-p test:tsc test:lint test:unit",

0 commit comments

Comments
 (0)