Skip to content

Commit

Permalink
feat: add auto deploy swagger api
Browse files Browse the repository at this point in the history
  • Loading branch information
peterxcli committed Jan 13, 2024
1 parent ec968f3 commit 28f0781
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Generate Swagger UI
uses: Legion2/swagger-ui-action@v1
with:
output: swagger-ui
spec-file: docs/swagger.json
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: swagger-ui

0 comments on commit 28f0781

Please sign in to comment.