Add CI step to push to Redocly.
This commit is contained in:
parent
3bc7afde04
commit
f815fb0119
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue