Skip to content

Commit 71e28b0

Browse files
committed
fix: prettify quickstart codeblock and improve CI build
- Add validation script to prettify codeblocks with better comments - Remove prebuild from CI - run validation locally before commit - Keep fetch-depth: 0 to fix nextra shallow clone warning
1 parent f45f4f5 commit 71e28b0

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ jobs:
6767

6868
- run: pnpm turbo run docgen --filter=@evolution-sdk/evolution
6969

70+
# Copy the generated API docs to the docs project
71+
- run: pnpm --filter=@evolution-sdk/docs run copy-evolution-docs
72+
7073
# Build the docs with Next.js static export (output: export in next.config.js)
7174
- run: pnpm --filter=@evolution-sdk/docs run build
7275

docs/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
"export": "next build",
1111
"copy-evolution-docs": "node scripts/copy-evolution-docs.mjs",
1212
"validate-codeblocks": "node scripts/validate-and-update-codeblocks.mjs",
13-
"prebuild": "pnpm run copy-evolution-docs && pnpm run validate-codeblocks"
13+
"validate-codeblocks-safe": "node scripts/validate-and-update-codeblocks.mjs",
14+
"prebuild": "pnpm run copy-evolution-docs && (pnpm run validate-codeblocks-safe || true)",
15+
"update-docs": "pnpm run copy-evolution-docs && pnpm run validate-codeblocks"
1416
},
1517
"dependencies": {
1618
"next": "^14.0.0",
@@ -23,6 +25,7 @@
2325
"@types/node": "^20.0.0",
2426
"@types/react": "^18.2.0",
2527
"@types/react-dom": "^18.2.0",
28+
"tsx": "^4.7.0",
2629
"typescript": "^5.0.0"
2730
}
2831
}

0 commit comments

Comments
 (0)