From aadb0567ef929931eee622f0fb21b81729351263 Mon Sep 17 00:00:00 2001 From: Jonathan Ehwald Date: Mon, 23 Sep 2024 00:17:30 +0200 Subject: [PATCH] Fix docs workflow deps were not fixed (#52) --- .github/workflows/docs.yml | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index dd43453..29f44d0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,16 +2,32 @@ name: Docs on: push: - branches: - - main + branches: [main] jobs: - deploy: + build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - name: Set up lowest supported Python version + uses: actions/setup-python@v5 with: - python-version: 3.x - - run: pip install mkdocs-material - - run: mkdocs gh-deploy --force + python-version: "3.x" + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + virtualenvs-create: true + virtualenvs-in-project: true + - name: Load cached venv + id: cached-poetry-dependencies + uses: actions/cache@v4 + with: + path: .venv + key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} + - name: Install dependencies + if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' + run: poetry install --no-interaction --no-root + - name: Install library + run: poetry install --no-interaction + - name: Build and deploy docs + run: poetry run mkdocs gh-deploy --force