Skip to content

[PKD-47]: migrate to python #4

[PKD-47]: migrate to python

[PKD-47]: migrate to python #4

Workflow file for this run

name: Update OpenAPI Schema
on:
push:
paths:
- 'server/**'
branches:
- main
pull_request:
paths:
- 'server/**'
branches:
- main
jobs:
update-schema:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12.5'
- name: Install dependencies with Pipenv
run: |
pip install pipenv
pipenv install --dev
working-directory: ./server
- name: Generate OpenAPI Schema
run: |
pipenv run python manage.py spectacular --color --file schema.yml
working-directory: ./server
- name: Commit and push schema file
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git add schema.yml
git commit -m "Update OpenAPI schema"
git push
working-directory: ./server