diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml index fc56b70c..103bf064 100644 --- a/.github/workflows/mkdocs.yml +++ b/.github/workflows/mkdocs.yml @@ -10,7 +10,34 @@ permissions: contents: write jobs: + api-schema: + name: API schema + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha || github.ref }} + + - name: Set up python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + architecture: "x64" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pip-tools + pip-compile ./requirements/development.txt --output-file ./full-requirements.txt --resolver=backtracking + pip install -r ./full-requirements.txt + + - name: Lint with ruff + run: python tests/test_app/manage.py spectacular --file docs/schema.yml + deploy: + needs: api-schema + name: Deploy documentation runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -27,5 +54,4 @@ jobs: - run: | pip install -r requirements/development.txt - run: | - python tests/test_app/manage.py spectacular --file docs/schema.yml mkdocs gh-deploy --force