From 17c42e07dd09b9413ddc1a98bd4aca298613af3c Mon Sep 17 00:00:00 2001 From: Xenepix38 Date: Mon, 27 Nov 2023 20:07:46 +0100 Subject: [PATCH] tmp --- .github/workflows/mkdocs.yml | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) 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