39 lines
860 B
YAML
39 lines
860 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
|
|
mkdir api
|
|
|
|
- name: Dependencies for OpenApi
|
|
run: npm install @openapitools/openapi-generator-cli
|
|
|
|
- name: Generate OpenApi documentation
|
|
run: $(npm bin)/openapi-generator generate -i api-docs.yaml -g html2 -o ./api
|
|
# continue-on-error: true
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
path: .
|
|
|
|
- name: Publish docs page
|
|
uses: helaili/jekyll-action@2.0.1
|
|
env:
|
|
JEKYLL_PAT: ${{ secrets.JEKYLL_PAT }} |