Skip to content

Commit e4741c9

Browse files
committed
smoke test
1 parent f5938c9 commit e4741c9

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.github/workflows/test-docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ jobs:
2222
- name: Build documentation
2323
working-directory: ./docs
2424
run: npm ci && npm run build
25+
- name: API docs smoke test
26+
working-directory: ./docs
27+
run: ./api-docs-smoke-test.sh

docs/api-docs-smoke-test.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
# If TypeDoc succeeds, it creates the directory with markdown files that Docusaurus uses to generate the API docs.
4+
# If TypeDoc fails, Docusaurus ignores the error, builds the site without API docs, and the "npm run build"
5+
# script still returns 0. This is why this separate smoke test is needed.
6+
7+
if [ ! -d "docs/usage/sdk/api" ]; then
8+
echo 'No files in "docs/usage/sdk/api" directory. Maybe TypeDoc failed?'
9+
exit 1
10+
fi

0 commit comments

Comments
 (0)