2020-10-22 08:36:19 +03:00
|
|
|
name: javascript-packages
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths:
|
2024-07-03 00:03:45 +03:00
|
|
|
- openapi.yaml
|
2020-10-22 08:36:19 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
run:
|
|
|
|
name: Generate API Documentation
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-05-04 01:39:59 +03:00
|
|
|
- name: Checkout repo
|
|
|
|
uses: actions/checkout@v4
|
2020-10-22 08:36:19 +03:00
|
|
|
|
2024-05-04 01:39:59 +03:00
|
|
|
- name: Run redoc on openapi.yaml
|
|
|
|
run: |
|
2024-07-03 00:21:47 +03:00
|
|
|
npx @redocly/cli --config docs/api/redocly.yaml build-docs openapi.yaml -o docs/api/index.html
|
2020-10-22 08:36:19 +03:00
|
|
|
|
2024-05-04 01:39:59 +03:00
|
|
|
- name: Commit changes
|
|
|
|
uses: EndBug/add-and-commit@v9
|
|
|
|
with:
|
|
|
|
author_name: Owncast
|
|
|
|
author_email: owncast@owncast.online
|
|
|
|
message: 'Commit updated API documentation'
|
|
|
|
add: 'docs/api/index.html'
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|