|
1 | 1 | name: Deploy API docs |
2 | 2 |
|
3 | 3 | on: |
4 | | - push: |
5 | | - branches: |
6 | | - - main |
7 | | - workflow_dispatch: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + workflow_dispatch: |
8 | 8 |
|
9 | 9 | jobs: |
10 | | - deploy: |
11 | | - name: Deploy API docs |
12 | | - runs-on: ubuntu-latest |
13 | | - permissions: |
14 | | - contents: write |
15 | | - steps: |
16 | | - - name: Checkout repo |
17 | | - uses: actions/checkout@v4 |
18 | | - |
19 | | - - name: Setup pnpm |
20 | | - uses: pnpm/action-setup@v4 |
21 | | - |
22 | | - - name: Setup Node.js |
23 | | - uses: actions/setup-node@v4 |
24 | | - with: |
25 | | - node-version: 22 |
26 | | - |
27 | | - - name: Install dependencies |
28 | | - run: pnpm install --frozen-lockfile |
29 | | - |
30 | | - - name: Build |
31 | | - run: | |
32 | | - pnpm build |
33 | | -
|
34 | | - - name: Generate Redocly and Swagger UI |
35 | | - run: | |
36 | | - npm i -g @redocly/cli@latest |
37 | | - redocly build-docs tsp-output/schema/openapi.1.0.0.yaml --output redocly.html |
38 | | -
|
39 | | - - name: Move files |
40 | | - run: | |
41 | | - mkdir -p publish/tsp-output/schema |
42 | | - mv tsp-output/schema/openapi.1.0.0.yaml publish/tsp-output/schema/openapi.1.0.0.yaml |
43 | | - mv index.html publish/index.html |
44 | | - mv swagger.html publish/swagger.html |
45 | | - mkdir -p publish/redocly |
46 | | - mv redocly.html publish/redocly/index.html |
47 | | -
|
48 | | - - name: Deploy to GitHub Pages |
49 | | - uses: peaceiris/actions-gh-pages@v4 |
50 | | - with: |
51 | | - github_token: ${{ secrets.GITHUB_TOKEN }} |
52 | | - publish_dir: ./publish |
| 10 | + deploy: |
| 11 | + name: Deploy API docs |
| 12 | + runs-on: ubuntu-latest |
| 13 | + permissions: |
| 14 | + contents: write |
| 15 | + steps: |
| 16 | + - name: Checkout repo |
| 17 | + uses: actions/checkout@v4 |
| 18 | + |
| 19 | + - name: Setup pnpm |
| 20 | + uses: pnpm/action-setup@v4 |
| 21 | + |
| 22 | + - name: Setup Node.js |
| 23 | + uses: actions/setup-node@v4 |
| 24 | + with: |
| 25 | + node-version: 24 |
| 26 | + |
| 27 | + - name: Install dependencies |
| 28 | + run: pnpm install --frozen-lockfile |
| 29 | + |
| 30 | + - name: Build Open API |
| 31 | + run: pnpm compile:openapi |
| 32 | + |
| 33 | + - name: Copy OpenAPI spec |
| 34 | + run: | |
| 35 | + mkdir -p website/tsp-output/schema |
| 36 | + cp tsp-output/schema/openapi.1.0.0.yaml website/tsp-output/schema/openapi.1.0.0.yaml |
| 37 | +
|
| 38 | + - name: Generate Redocly and Swagger UI |
| 39 | + run: pnpm build:redocly |
| 40 | + |
| 41 | + - name: Generate Typedoc documentation |
| 42 | + run: | |
| 43 | + pnpm build:sdk |
| 44 | + pnpm compile:sdk |
| 45 | + pnpm build:typedoc |
| 46 | +
|
| 47 | + - name: Deploy to GitHub Pages |
| 48 | + uses: peaceiris/actions-gh-pages@v4 |
| 49 | + with: |
| 50 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 51 | + publish_dir: ./website |
0 commit comments