diff --git a/.github/workflows/pages.yaml b/.github/workflows/pages.yaml index 1423c38..43f69a8 100644 --- a/.github/workflows/pages.yaml +++ b/.github/workflows/pages.yaml @@ -20,6 +20,13 @@ jobs: - name: Configure pages uses: actions/configure-pages@v5 + - uses: actions/cache@v4 + with: + path: | + _build/.jupyter_cache + _build/jupyter_execute + key: pages-${{ runner.os }}-${{ hashFiles('docs/source/notebooks/**') }} + - name: Install uv uses: astral-sh/setup-uv@v4 @@ -31,12 +38,14 @@ jobs: run: uv pip install .[docs] - name: Generate HTML - run: uv run sphinx-build -d _build/doctrees docs/source _build/html + run: | + uv run sphinx-build -j auto \ + -d _build/doctrees docs/source _build/html - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: - path: "_build/html" + path: _build/html deploy: if: contains(fromJSON('["main", "master"]'), github.ref_name) && github.event_name != 'pull_request' diff --git a/docs/source/conf.py b/docs/source/conf.py index dc8350a..2a71cd3 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -14,3 +14,4 @@ nb_render_image_options = {"width": "450px", "align": "center"} nb_execution_timeout = 600 html_sidebars = {"**": []} +jupyter_execute_notebooks = "cache"