-
Notifications
You must be signed in to change notification settings - Fork 7
34 lines (34 loc) · 1.12 KB
/
docapi.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
name: generate API docs
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: "recursive"
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Install node package
run: npm install @redocly/cli -g
- name: Generate API Doc
run: redocly build-docs ./api/api.yaml
- name: Move the file to the final folder
run: mv redoc-static.html ./docs/apidoc.html
- name: Commit files
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add ./docs/apidoc.html
git commit -a -m "Add changes to API Doc"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}