Skip to content

Generate openapi.json #63

Generate openapi.json

Generate openapi.json #63

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
- 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 📖