forked from meshery/meshery
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (40 loc) · 1.42 KB
/
redocly.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
name: OpenAPI Specification and Documentation
on:
push:
branches:
- "master"
paths:
- "handlers/**"
jobs:
redocly:
if: github.repository == 'meshery/meshery'
name: Generate Redocly docs
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Setup go-swagger
uses: minchao/setup-go-swagger@v1
with:
version: v0.26.1
- name: swagger-spec
run: swagger generate spec -o ./server/helpers/swagger.yaml --scan-models
- name: swagger-docs
run: swagger generate spec -o ./docs/_data/swagger.yml --scan-models; swagger flatten ./docs/_data/swagger.yml -o ./docs/_data/swagger.yml --with-expand --format=yaml
- name: Install dependencies
run: npm install -g @redocly/openapi-cli
- name: Generate documentation
run: npx @redocly/cli build-docs ./docs/_data/swagger.yml --config='redocly.yaml'
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
file_pattern: docs
commit_user_name: l5io
commit_user_email: [email protected]
commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
commit_options: "--signoff"
commit_message: "[Docs] Updated Redocly docs for REST API"