baybe icon indicating copy to clipboard operation
baybe copied to clipboard

Multi-version documentation

Open AVHopp opened this issue 7 months ago • 0 comments

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, including stable and latest, 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:
  1. There was a push to main: This rebuilds the latest folder and updates it.
  2. There was a release: This updates the folders latest, stable and X.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 from main 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.

AVHopp avatar Jul 18 '24 12:07 AVHopp