-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (31 loc) · 898 Bytes
/
swagger.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: 'Deploy Swagger'
on:
push
jobs:
deploy-swagger:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install dependencies
run: npm install
- name: Generate Swagger JSON
run: npm run swagger:generate
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
GCP_AUTHJSON_BASE64: ${{ secrets.GCP_AUTHJSON_BASE64 }}
- name: Generate Swagger UI
uses: Legion2/swagger-ui-action@v1
with:
output: swagger-ui
spec-file: swagger.json
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: swagger-ui