Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,35 @@ jobs:
echo "Changed examples: $CHANGED_EXAMPLES"
fi

- name: Cache built documentation
- name: Cache executed gallery examples
id: cache-docs
uses: actions/cache@v4
with:
# sphinx-gallery decides whether to re-run an example by comparing the
# example's md5 against `<example>.py.md5` beside its generated rst in
# doc/auto_examples, so that directory -- not the rendered html -- is
# what makes a rebuild cheap.
path: |
doc/_build/html
key: ${{ runner.os }}-sphinx-${{ hashFiles('examples/**/*.py', 'doc/**/*', 'conf.py') }}
doc/auto_examples
doc/_build/doctrees
# Two-part key. The prefix pins everything the per-example md5 cannot
# see -- library, docs sources, docs environment -- so a prefix
# fallback can only ever reuse stamps built against the same library,
# and an example-only change still reuses the other examples' output.
key: ${{ runner.os }}-sphinx-${{ hashFiles('eegnb/**/*.py', 'doc/**/*', 'environments/eeg-expy-docsbuild.yml') }}-${{ hashFiles('examples/**/*.py') }}
restore-keys: |
${{ runner.os }}-sphinx-
${{ runner.os }}-sphinx-${{ hashFiles('eegnb/**/*.py', 'doc/**/*', 'environments/eeg-expy-docsbuild.yml') }}-

- name: Build docs
run: make docs

- name: Upload built docs
uses: actions/upload-artifact@v4
with:
name: docs-build-preview
path: doc/_build/html
retention-days: 14

- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master' # TODO: Deploy seperate develop-version of docs?
Expand Down
Loading