Alternatives:
Re-build:
https://github.com/sphinx-contrib/multiversion
https://sphinx-contrib.github.io/multiversion
All versions have to be re-built each time something changes.
Another variation: https://github.com/devanshshukla99/sphinx-versioned-docs
Their now apparently unmaintained predecessors seem to be:
https://github.com/sphinx-contrib/sphinxcontrib-versioning
https://github.com/Smile-SA/sphinx-versions
Fetch with JavaScript:
https://docs.readthedocs.io/en/stable/flyout-menu.html
https://docs.readthedocs.io/en/stable/versions.html
https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/version-dropdown.html
Inject into previously built HTML files:
https://github.com/steinwurf/versjon
Injects text in existing HTML files
Non-Sphinx projects with versioning:
https://docusaurus.io/docs/versioning
https://github.com/jimporter/mike (for MkDocs)
Blog post that shows how to create multi-version Sphinx docs with GitHub Pages: https://www.codingwiththomas.com/blog/my-sphinx-best-practice-for-a-multiversion-documentation-in-different-languages
Another tutorial: https://olgarithms.github.io/sphinx-tutorial/docs/9-versioning.html