Generate openapi.json #67
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: "Generate openapi.json" | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "15 0 * * 0" # Run at 00:15 every Sunday | |
jobs: | |
update-openapi-json: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
defaults: | |
run: | |
shell: bash -el {0} | |
steps: | |
- name: "Checkout repository 🛎️" | |
uses: actions/checkout@v4 | |
- name: "Set up Miniconda 🐍" | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
environment-file: conda-store-server/environment-dev.yaml | |
conda-remove-defaults: "true" | |
- name: "Install conda-store-server 📦" | |
run: python -m pip install conda-store-server/. | |
- name: "Run openapi.json generation script" | |
run: | | |
python docusaurus-docs/scripts/generate_openapi_json.py | |
jq . --sort-keys docusaurus-docs/static/openapi.json > docusaurus-docs/static/openapi.json.formatted | |
mv docusaurus-docs/static/openapi.json.formatted docusaurus-docs/static/openapi.json | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
title: "[AUTO] Update openapi.json" | |
commit-message: "[AUTO] Update openapi.json" | |
add-paths: docusaurus-docs/static/openapi.json | |
labels: | | |
needs: review 👀 | |
type: maintenance 🛠 | |
area: api | |
area: documentation 📖 |