2020-10-22 08:36:19 +03:00
|
|
|
name: javascript-packages
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- openapi.yaml
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
run:
|
|
|
|
name: Generate API Documentation
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2022-04-10 14:54:39 +03:00
|
|
|
uses: actions/checkout@v3
|
2020-10-22 08:36:19 +03:00
|
|
|
|
|
|
|
- name: Run redoc on openapi.yaml
|
|
|
|
run: |
|
2022-03-19 22:02:34 +03:00
|
|
|
npx redoc-cli bundle openapi.yaml -o docs/api/index.html --options '{"hideHostname": true, "pathInMiddlePanel": true}'
|
2020-10-22 08:36:19 +03:00
|
|
|
|
|
|
|
- name: Commit changes
|
2022-04-10 10:56:40 +03:00
|
|
|
uses: EndBug/add-and-commit@v9
|
2020-10-22 08:36:19 +03:00
|
|
|
with:
|
|
|
|
author_name: Owncast
|
|
|
|
author_email: owncast@owncast.online
|
|
|
|
message: "Commit updated API documentation"
|
2022-03-19 22:02:34 +03:00
|
|
|
add: "docs/api/index.html"
|
2020-10-22 08:36:19 +03:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|