Update API spec #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update API spec | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '00 01 1 * *' | |
jobs: | |
update-api-spec: | |
runs-on: ubuntu-latest | |
name: Download API spec from current stable Atlas | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
fetch-depth: 0 | |
- run: | | |
set -euo pipefail | |
git config --global user.name 'Safe Sky Release Automation' | |
git config --global user.email 'release@safe-sky.net' | |
curl -LO https://api.safe-sky.net/v1/openapi.json | |
npm i -g @redocly/cli@latest | |
redocly build-docs openapi.json -o docs/index.html | |
git add openapi.json docs/index.html | |
git commit -am 'Import updated API specs' || exit 0 | |
git push |