diff --git a/.github/workflows/build_openapi.yaml b/.github/workflows/build_openapi.yaml new file mode 100644 index 00000000..8e8dc69d --- /dev/null +++ b/.github/workflows/build_openapi.yaml @@ -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 \ No newline at end of file