mirror of
https://github.com/owncast/owncast.git
synced 2024-11-25 06:12:23 +03:00
34 lines
965 B
YAML
34 lines
965 B
YAML
name: javascript-packages
|
|
on:
|
|
push:
|
|
paths:
|
|
- openapi.yaml
|
|
|
|
jobs:
|
|
run:
|
|
name: Generate API Documentation
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out pull request code
|
|
uses: actions/checkout@v4
|
|
if: github.event_name == 'pull_request'
|
|
with:
|
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
|
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v4
|
|
if: github.event_name == 'push'
|
|
|
|
- name: Run redoc on openapi.yaml
|
|
run: |
|
|
npx @redocly/cli --config docs/api/redocly.yaml build-docs openapi.yaml -o docs/api/index.html
|
|
|
|
- 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 }}
|