37 lines
788 B
YAML
37 lines
788 B
YAML
name: Generate documentation
|
|
|
|
#on:
|
|
# push:
|
|
# paths:
|
|
# - 'docs/**'
|
|
|
|
on: push
|
|
|
|
jobs:
|
|
github-pages:
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
path: ./repo
|
|
|
|
- name: Prepare workdir
|
|
run: |
|
|
cp -r ./repo/docs/page/* .
|
|
cp ./repo/docs/api-docs.yaml .
|
|
rm -rf ./repo
|
|
|
|
- name: Dependencies for OpenApi
|
|
run: npm ci @openapitools/openapi-generator-cli -g
|
|
|
|
- name: Generate OpenApi documentation
|
|
run: openapi-generator generate -i api-docs.yaml -g html /api
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
path: .
|
|
|
|
- name: Publish docs page
|
|
uses: helaili/jekyll-action@2.0.1
|
|
env:
|
|
JEKYLL_PAT: ${{ secrets.JEKYLL_PAT }} |