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