-
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 988 Bytes
/
api_docs.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
34
35
36
37
38
39
40
41
42
name: Deploy API docs
on:
push:
branches:
- main
- develop
jobs:
generate-spec:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: yarn install
- name: Generate file
run: yarn swagger
- name: Upload file
uses: actions/upload-artifact@v3
with:
name: spec-file
path: swagger-output.json
deploy:
needs: generate-spec
runs-on: ubuntu-latest
steps:
- name: Download file
uses: actions/download-artifact@v3
with:
name: spec-file
- name: Generate Swagger UI
uses: Legion2/swagger-ui-action@v1
with:
output: swagger-ui
spec-file: swagger-output.json
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ github.token }}
publish_dir: swagger-ui
cname: api-docs.lipoic.org