Merge pull request #46 from NYCU-SDC/docs/mermaid-flowchart #22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy API docs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| name: Deploy API docs | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build Open API | |
| run: pnpm compile:openapi | |
| - name: Copy OpenAPI spec | |
| run: | | |
| mkdir -p website/tsp-output/schema | |
| cp tsp-output/schema/openapi.1.0.0.yaml website/tsp-output/schema/openapi.1.0.0.yaml | |
| - name: Generate Redocly and Swagger UI | |
| run: pnpm build:redocly | |
| - name: Generate Typedoc documentation | |
| run: | | |
| pnpm build:sdk | |
| pnpm compile:sdk | |
| pnpm build:typedoc | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./website |