File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,16 +75,21 @@ jobs:
7575 run : |
7676 set -euo pipefail
7777
78- output_dir="docs/src/${REPO_NAME}"
78+ output_dir="docs/src/${REPO_NAME}/api "
7979 mkdir -p "$output_dir"
80- find "$output_dir" -maxdepth 1 -type f -name "*.md" ! -name "index.md" -delete
80+ find "$output_dir" -maxdepth 1 -type f -name "*.md" -delete
8181
82- luajit scripts/generate-api-docs.lua "${RUNNER_TEMP}/source/types" "$output_dir"
82+ luajit scripts/generate-api-docs.lua "${RUNNER_TEMP}/source/types" "$output_dir" "$REPO_NAME"
8383 env :
8484 REPO_NAME : ${{ matrix.repo.name }}
8585
8686 - name : Format docs
87- run : npx --yes prettier@3.8.3 --write "docs/src/${REPO_NAME}/*.md"
87+ run : |
88+ set -euo pipefail
89+
90+ if compgen -G "docs/src/${REPO_NAME}/api/*.md" > /dev/null; then
91+ npx --yes prettier@3.8.3 --write "docs/src/${REPO_NAME}/api/*.md"
92+ fi
8893 env :
8994 REPO_NAME : ${{ matrix.repo.name }}
9095
96101 body : " Generate and format API docs from `${{ matrix.repo.name }}` LuaLS type annotations."
97102 branch : " automation/generate-docs-${{ matrix.repo.name }}"
98103 add-paths : |
99- docs/src/${{ matrix.repo.name }}
104+ docs/src/${{ matrix.repo.name }}/api
You can’t perform that action at this time.
0 commit comments