-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (39 loc) · 1 KB
/
publish-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
43
name: Publish OpenAPI Specs
on:
push:
branches:
- main
paths:
- docs/**
workflow_dispatch:
concurrency:
group: publish_openapi_specs
cancel-in-progress: true
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Upload spec-file
uses: actions/upload-artifact@v4
with:
name: spec-file
path: docs/openapi.yaml
- name: Download spec-file
uses: actions/download-artifact@v4
with:
name: spec-file
- name: Generate Swagger UI
uses: Legion2/swagger-ui-action@v1
with:
output: swagger-ui
spec-file: openapi.yaml
# the gh pages are setup to build and deploy on push to the 'gh-pages' branch
- name: Push to gh-pages branch
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: swagger-ui