Add CI step to push to Redocly.

This commit is contained in:
Buster "Silver Eagle" Neece 2021-10-23 17:19:37 -05:00
parent 3bc7afde04
commit f815fb0119
No known key found for this signature in database
GPG Key ID: 6D9E12FF03411F4E
1 changed files with 141 additions and 117 deletions

View File

@ -106,6 +106,9 @@ jobs :
npm run import-locales
npm run build
- name: Build OpenAPI Docs
run: bin/console azuracast:api:docs
- name: Set up functional test environment.
run: |
cp sample.env .env
@ -146,6 +149,27 @@ jobs :
web/static/webpack_dist
web/static/webpack.json
web/static/assets.json
web/static/api/openapi.yml
push-api-docs:
name: Push API Docs
needs: build
runs-on: ubuntu-latest
if: |
github.event_name == 'push' || github.event_name == 'schedule'
endsWith(github.ref, github.event.repository.default_branch)
env:
REDOCLY_AUTHORIZATION: ${{ secrets.REDOCLY_AUTHORIZATION }}
steps:
- uses: actions/checkout@master
- name: Download built static assets from previous step
uses: actions/download-artifact@v2
with:
name: assets
- name: Submit OpenAPI YML to Redocly
run: npx @redocly/openapi-cli@latest push ./web/static/api/openapi.yml "@azuracast/AzuraCast@Latest"
publish:
name: Publish