From f4341d8c14f6cf092f23efb94def8d92fcd461a6 Mon Sep 17 00:00:00 2001 From: Teo Gebhard Date: Mon, 9 Dec 2024 14:14:07 +0200 Subject: [PATCH] smoke test --- .github/workflows/test-docs.yml | 2 +- docs/api-docs-smoke-test.sh | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100755 docs/api-docs-smoke-test.sh diff --git a/.github/workflows/test-docs.yml b/.github/workflows/test-docs.yml index 521b03edc4..bc6345dbff 100644 --- a/.github/workflows/test-docs.yml +++ b/.github/workflows/test-docs.yml @@ -21,4 +21,4 @@ jobs: run: npm run bootstrap - name: Build documentation working-directory: ./docs - run: npm ci && npm run build + run: npm ci && npm run build && ./api-docs-smoke-test.sh diff --git a/docs/api-docs-smoke-test.sh b/docs/api-docs-smoke-test.sh new file mode 100755 index 0000000000..4b2f2ff552 --- /dev/null +++ b/docs/api-docs-smoke-test.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# If TypeDoc succeeds, it creates the directory with markdown files that Docusaurus uses to generate the API docs. +# If TypeDoc fails, Docusaurus ignores the error, builds the site without API docs, and the "npm run build" +# script still returns 0. This is why this separate smoke test is needed. + +if [ ! -d "docs/usage/sdk/api" ]; then + echo 'No files in "docs/usage/sdk/api" directory. Maybe TypeDoc failed?' + exit 1 +fi \ No newline at end of file