-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.05 KB
/
oas-documentation.yml
File metadata and controls
41 lines (39 loc) · 1.05 KB
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
name: OAS Documentation
on:
push:
jobs:
validate-oas-spec:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Set up
run: |
npm install -g @openapitools/openapi-generator-cli@1.0.10-4.2.3
- name: Validate OpenAPI documentation
run: |
npx openapi-generator validate -i api.yml
deploy-oas-spec:
runs-on: ubuntu-18.04
if: github.ref == 'refs/heads/master'
needs: validate-oas-spec
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Set up
run: |
npm install -g redoc-cli
- name: Generate documentation
run: |
npx redoc-cli bundle api.yml -o docs/index.html
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs