baybe
baybe copied to clipboard
Multi-version documentation
This PR introduces the multi-version documentation.
The logic is the following:
- A new branch
gh-pages
was created. On this branch, the actual documentation is hosted. For each version of the documentation, includingstable
andlatest
, there is one folder containing the actual documentation. This makes the folders reachable via URLs once the settings in the repository have changed. - As of now, the latest
stable
version is included for "backwards compatibility". Note however that this version does not yet contain the version selector and won't until the next release! - There are two different cases in which the new
docs
workflow will be triggered:
- There was a push to main: This rebuilds the
latest
folder and updates it. - There was a release: This updates the folders
latest
,stable
andX.Y.Z´, where
X.Y.Z` is the tag that was used in the release.
- Whenever any folder other than
stable
is being created, an announcement banner saying that this is not the stable version is included. Also, a "version selector" is injected, showing both the current version and providing a link to the (currently not nice looking) page for switching the version. - The
gh-pages
branch was designed such that it is as minimal as possible. Thus, all actual python scripts and logic is contained in the actual branch and is being copied frommain
whenever the documentation is built. - NOTE: This does not yet fix the issue of having the proper README.md appear on the github page for technical reasons. Happy to explain the detailed reasons via a meeting or here if you are interested.
For testing, I created the exact same Pull Request as well as as "dummy release" on my fork and merged both of these/created a new release, so please have a look at https://avhopp.github.io/baybe_dev/stable/ for details.