Skip to content

Deploy API Docs to Github Pages #26

Deploy API Docs to Github Pages

Deploy API Docs to Github Pages #26

Workflow file for this run

name: Deploy API Docs to Github Pages
on:
workflow_run:
workflows: ["Test"]
branches: [main]
types:
- completed
jobs:
deploy-docs:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Generate API documentation
run: pnpm docs
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: swagger
publish_branch: gh-pages