.gitlab-ci.yml: use environments for documentation versioning
This leverages Environments on GitLab to expose different versions of
Knot Resolver docs. The docs:build
job builds the documentation and
exposes it via job artifacts. Then docs:develop
(for branches) and
docs:release
(for tags) take these artifacts and expose them via an
Environment link (an example of this in action may be seen at
https://gitlab.nic.cz/ostava/knot-resolver/-/environments).
There is also an optional, manually runnable docs:public
job, which,
when run, propagates the documentation to the main GitLab Pages of the
project (e.g. https://knot.pages.nic.cz/knot-resolver) - this will
probably be mostly used for the latest release, although this setup
pretty much allows us to swap it for whatever version we like at any
time.
Merge request reports
Activity
added usability label
Since Sphinx on local deployments does not contain any special menu for version selection, we probably need to resolve, how to let users know that they can use Environments to pick their preferred docs version.
The simplest solution would probably be to place a well-visible link to the Environments page on the docs' landing page. A more complicated but still feasible solution could probably leverage GitLab's REST API to fetch the Environments and show them in a friendly way, either directly on the docs page (maybe similarly to ReadTheDocs' version panel) or otherwise.
- Resolved by Vladimír Čunát
mentioned in commit e925b371