-
Notifications
You must be signed in to change notification settings - Fork 4
30 lines (28 loc) · 1.05 KB
/
docs.yaml
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
name: Docs Pipeline
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- master
jobs:
# Generate OpenAPI docs
generate_api_doc:
name: Generate OpenAPI docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Generate docs
run: docker run -u $(id -u):$(id -g) --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate -g html -i /local/specs/api.yaml -o /local/html/
- name: Setup assets
run: |
mkdir --parents public/lm-openapi-html
mv html/* public/lm-openapi-html
- name: Publish docs
uses: peaceiris/actions-gh-pages@v3
with:
# https://github.com/marketplace/actions/github-pages-action
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
keep_files: true # keep existing files in gh-pages branch
enable_jekyll: true # Make sure this is enabled or the action will be default turn off Jekyll