File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed
Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -25,14 +25,25 @@ jobs:
2525
2626 - name : Build project
2727 run : npm run build
28-
29- - name : Generate documentation
30- run : npm run docs
28+
29+ - name : Generate TypeDoc (Markdown)
30+ run : npm run docs:api
31+
32+ - name : Fetch OpenAPI spec
33+ run : curl -L https://api.tenantos.com/docs/openapi.yaml -o openapi.yaml
34+
35+ - name : Generate Redoc (OpenAPI HTML)
36+ run : |
37+ if [ -f openapi.yaml ]; then
38+ npm run docs:openapi || echo "Redoc generation failed; continuing"
39+ else
40+ echo "No openapi.yaml found; skipping Redoc"
41+ fi
3142
3243 - name : Deploy to GitHub Pages
3344 if : github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
3445 uses : peaceiris/actions-gh-pages@v3
3546 with :
3647 github_token : ${{ secrets.GITHUB_TOKEN }}
37- publish_dir : ./.github/ docs
38- destination_dir : docs
48+ publish_dir : ./docs
49+ destination_dir : .
Original file line number Diff line number Diff line change 3737 "test" : " echo \" Error: no test specified\" && exit 1" ,
3838 "schema:gen" : " npx openapi-typescript https://api.tenantos.com/docs/openapi.yaml -o src/schema.ts" ,
3939 "docs:api" : " typedoc" ,
40- "docs:openapi" : " redoc- cli build openapi.yaml -o docs/openapi/index.html" ,
40+ "docs:openapi" : " npx @redocly/ cli build-docs openapi.yaml -o docs/openapi/index.html" ,
4141 "docs" : " npm run docs:api && npm run docs:openapi" ,
4242 "docs:api:html" : " typedoc --options typedoc.html.json"
4343 },
You can’t perform that action at this time.
0 commit comments