forked from conda-incubator/conda-store
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (40 loc) · 1.41 KB
/
generate_api_docs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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 📖