Skip to content

Update API spec

Update API spec #11

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 '[email protected]'
curl -LO https://atlas.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