From 72f8574f6d0304ad9981f16e245fa3e63524ed66 Mon Sep 17 00:00:00 2001 From: han16nah <41050948+han16nah@users.noreply.github.com> Date: Sun, 9 Feb 2025 21:57:55 +0100 Subject: [PATCH] Docs (#225) Fixing workflow hopefully --- .github/workflows/documentation.yml | 24 ++++++++---------------- docs/conf.py | 2 +- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 9d6c41a3..5c141939 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -1,35 +1,27 @@ name: Docs on: [push, pull_request, workflow_dispatch] permissions: - contents: write + contents: write jobs: docs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: '3.12' + - name: Install poetry uses: abatilo/actions-poetry@v3 + - name: Install dependencies - run: poetry install --no-root - - name: Setup a local virtual environment for caching - run: | - poetry config virtualenvs.create true --local - poetry config virtualenvs.in-project true --local - - name: Define a cache for the virtual environment based on the dependencies lock file to speed up later runs - uses: actions/cache@v4 - with: - path: ./.venv - key: venv-${{ hashFiles('poetry.lock') }} - - name: Install sphinx - run: pip install sphinx sphinx_rtd_theme - - name: Install myst-parser - run: pip install myst-parser + run: poetry install + - name: Sphinx build run: | - sphinx-build docs _build + poetry run sphinx-build docs _build + - name: Deploy uses: peaceiris/actions-gh-pages@v4 if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} diff --git a/docs/conf.py b/docs/conf.py index 3ad0f9f1..7ede94b2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -81,7 +81,7 @@ # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static"] -html_extra_path = ["_build"] +html_extra_path = ["_build", "generated"] html_css_files = [ "css-style.css", ]