Conversation
Revamp documentation CI: rename workflow, remove scheduled run and ReadTheDocs config, and add caching for Sphinx output. Set USE_CACHE env, change job id to build-doc, make apt-get install use -y, clarify install steps and use a multiline step to uninstall vtk and install vtk-osmesa for headless rendering. Add actions/cache for docs/_build keyed by source and docs files. Update docs/conf.py canonical_url to the GitHub Pages docs URL and delete .readthedocs.yaml to consolidate docs builds under GitHub Actions.
Replace ReadTheDocs documentation links with the GitHub Pages site (https://3mah.github.io/microgen-docs/) in conda.recipe/meta.yaml and pyproject.toml so package metadata points to the hosted docs.
ylgrst
left a comment
There was a problem hiding this comment.
Good PR for a useful change.
I did find some readme anchors discrepancies. Even though redirection still works fine, fixing those can prevent broken links in the future
I also have my reservations regarding how docs caching is done but I don't know any good practice about this
| - name: Cache Sphinx build directory | ||
| uses: actions/cache@v4 | ||
| if: env.USE_CACHE == 'true' | ||
| with: | ||
| path: docs/_build/ | ||
| key: doc-build-${{ hashFiles('microgen/__init__.py') }}-${{ hashFiles('docs/**/*.rst') }} | ||
| restore-keys: | | ||
| doc-build-${{ hashFiles('microgen/__init__.py') }}- | ||
| doc-build- | ||
|
|
||
| - name: Build Documentation | ||
| run: make -C docs html |
There was a problem hiding this comment.
I'm not very sure of the behavior here
While caching previously generated docs is a good idea for faster build when nothing is changed, caching the whole output only based on init and *.rst as cache keys run the risk of republishing obsolete docs if, for example, box.py changes but the author forgets to change the corresponding .rst file
However I do not know what would be the best practice here
Co-authored-by: Yasmin Legerstee <125015797+ylgrst@users.noreply.github.com>
Co-authored-by: Yasmin Legerstee <125015797+ylgrst@users.noreply.github.com>
This pull request migrates the documentation hosting from Read the Docs to GitHub Pages and updates the build workflow accordingly. It removes Read the Docs configuration, updates documentation links throughout the project, and improves the GitHub Actions workflow for building and caching documentation. These changes ensure that users and contributors are directed to the new documentation site and that documentation builds are more efficient.
Documentation Hosting Migration
.readthedocs.yamlto discontinue Read the Docs builds and hosting.README.mdto point to the new GitHub Pages site (https://3mah.github.io/microgen-docs/). [1] [2]docs/conf.pyto the new documentation site.Build Workflow Improvements
.github/workflows/build-docs.ymlto reflect the new documentation process, added caching for Sphinx builds, and improved installation steps for dependencies. [1] [2] [3]