Skip to content

Commit

Permalink
added gh action to generate the openapi json file
Browse files Browse the repository at this point in the history
Signed-off-by: Surax98 <[email protected]>
  • Loading branch information
Surax98 committed Jul 24, 2024
1 parent 9738668 commit 651383f
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build_openapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Update OpenAPI

on:
push:
branches:
- '**'

jobs:
update-openapi:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x' # specify the Python version you need

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r example/requirements.txt # if you have a requirements file
- name: Run script to generate OpenAPI JSON
run: python example/create_openapi.py

- name: Upload OpenAPI JSON as an artifact
uses: actions/upload-artifact@v4
with:
name: openapi.json
path: ./docs/openapi/openapi.json

0 comments on commit 651383f

Please sign in to comment.