I have a code project hosted on a custom gitlab instance. This project is part of a subgroup. We'd like to host static html content, generated by doxygen and similar tools, using Gitlab Pages. Trivial examples work very well, so I believe it's safe to conclude that the general gitlab + gitlab pages setup is fine.
Now I'd like to publish dedicated html pages for each tagged software version. This is due to us using git tags to mark releases, and for each release the related code documentation shall be persistently available.
Here's my .gitlab-ci.yml file trying to accomplish this:
image: alpine:latest
pages:
stage: deploy
script:
- mkdir public
# Provide a sample "html" page instead of running doxygen
- echo $CI_PAGES_URL > public/index.html
artifacts:
paths:
- public
# Desperate attempt:
environment:
name: $CI_COMMIT_REF_SLUG
url: $CI_PAGES_URL/$CI_COMMIT_REF_SLUG
only:
- tags
As a result of a gitlab runner executing this script the page is published, but under the "main" project pages URL, not under a dedicated URL related to the tag name / "commit ref slug". The deployment environment is created, too, and I can click "View deployment" (see gitlab deploy environment showing the "View deployment" button), but when doing so I get a 404 error.
I'd appreciate any hints on how to accomplish the described goal.
PS: This might sound related to Deploying GitLab pages for different branches, but I think it is not. Please correct me if I'm wrong.