| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Co-authored-by: JohnGriffiths <397826+JohnGriffiths@users.noreply.github.com>
…rtifact The cache stores `doc/_build/html`, which is not what makes a docs build cheap. sphinx-gallery skips an example only when `<example>.py.md5` sits beside its generated rst in `doc/auto_examples`, and Sphinx tracks staleness in `doc/_build/doctrees` — neither cached, both gitignored, so every example re-executes every run. On master push [33301489918](https://github.com/NeuroTechX/EEG-ExPy/actions/runs/33301489918) the cache hit and the computation-time summary still shows 32.9 s, 31.3 s, 29.3 s, 24.2 s. Cache those two directories instead. Locally: cold build 145 s, rebuild 28 s, all previously executed examples at 0.00 s. The key is two-part because the per-example md5 cannot see a library change. The prefix hashes `eegnb/**`, `doc/**` and the docs environment; the examples hash follows it. So a `restore-keys` fallback only matches an entry built against the same library: examples-only PR reuses the rest, library change re-runs cold. Also adds `upload-artifact`, so a reviewer can download a PR's rendered docs — `docs.yml` otherwise only publishes on push to `master`. No change to the `master` deploy. Related: NeuroTechX#322 (draft) adds an artifact step too and deploys a live preview to `gh-pages/pr-preview/`; that push needs a write token, which fork `pull_request` runs don't get, so the artifact is the part that works everywhere.
…rtifact The cache stores `doc/_build/html`, which does not make a docs build cheaper. sphinx-gallery skips an example only when `<example>.py.md5` sits beside its generated rst in `doc/auto_examples`, and Sphinx tracks staleness in `doc/_build/doctrees`. The current cache holds neither directory, so every example re-executes on every run. On master push [33301489918](https://github.com/NeuroTechX/EEG-ExPy/actions/runs/33301489918/attempts/1) the cache hit, yet the examples still took 155 s to execute in total. Cache those two directories instead, so unchanged examples are skipped. Locally, a build drops from 145 s (every run today) to 28 s when no example changed. The key has two parts because each example's md5 covers only that example's file, so it is not affected by changes to the library, docs sources or docs environment. The prefix hashes `eegnb/**`, `doc/**`, the docs environment, `requirements.txt` and `setup.py`; the examples hash follows. A `restore-keys` fallback therefore only matches an entry built with the same prefix: an examples-only PR reuses the other examples' output, and a change to any file in the prefix triggers a full rebuild. Also adds `upload-artifact`, so reviewers can download a PR's rendered docs; `docs.yml` otherwise only publishes on push to `master`. The `master` deploy is unchanged. Related: NeuroTechX#322 (draft) also adds an artifact step and deploys a live preview to `gh-pages/pr-preview/`. That push needs a write token, which fork `pull_request` runs don't get, so the artifact is the part that works everywhere.
…rtifact (#337) The cache stores `doc/_build/html`, which does not make a docs build cheaper. sphinx-gallery skips an example only when `<example>.py.md5` sits beside its generated rst in `doc/auto_examples`, and Sphinx tracks staleness in `doc/_build/doctrees`. The current cache holds neither directory, so every example re-executes on every run. On master push [33301489918](https://github.com/NeuroTechX/EEG-ExPy/actions/runs/33301489918/attempts/1) the cache hit, yet the examples still took 155 s to execute in total. Cache those two directories instead, so unchanged examples are skipped. Locally, a build drops from 145 s (every run today) to 28 s when no example changed. The key has two parts because each example's md5 covers only that example's file, so it is not affected by changes to the library, docs sources or docs environment. The prefix hashes `eegnb/**`, `doc/**`, the docs environment, `requirements.txt` and `setup.py`; the examples hash follows. A `restore-keys` fallback therefore only matches an entry built with the same prefix: an examples-only PR reuses the other examples' output, and a change to any file in the prefix triggers a full rebuild. Also adds `upload-artifact`, so reviewers can download a PR's rendered docs; `docs.yml` otherwise only publishes on push to `master`. The `master` deploy is unchanged. Related: #322 (draft) also adds an artifact step and deploys a live preview to `gh-pages/pr-preview/`. That push needs a write token, which fork `pull_request` runs don't get, so the artifact is the part that works everywhere.
|
Now that #337 is merged, should we close this one? The live gh-pages preview only works for branches on this repo, because PRs from forks get a read-only token, so most contributors wouldn't get a preview. I'm not sure there's a good way to make a live preview work for forks. In the meantime, every docs CI run (forks included) uploads the built HTML as a docs-build-preview artifact, kept for 14 days. You can download it from the run's Summary page and open index.html. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The docs workflow built documentation on every PR but provided no way to view the output. This adds PR preview deployments with an automatic bot comment linking to the live preview.
Changes to .github/workflows/docs.yml
The existing master-branch deployment via peaceiris/actions-gh-pages is unchanged. Preview URLs follow the pattern:
https://neurotechx.github.io/EEG-ExPy/pr-preview/pr-{number}/✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.