GitLab pages for different branches
Attempt 1
Stack Overflow: Deploying GitLab pages for different branches
It doesn't work because each page's URL must be ended with "index.html," which will not work with all links in the website except the home page.
Attempt 2
GitLab Pages per Branch: The No-Compromise Hack to Serve Preview Pages
I couldn't get it work. A comment of a Stackoverflow post explained:
Something really useful
After spending several hours trying, I found the following posts on GitLab that are useful:
- Allow customizing the artifacts path ("public") in GitLab Pages
- Automatically use the "publish" property in the pages job as an artifact
Conclusion
At the time of writing, GitLab Pages doesn't support deploying multiple branches.
Last modified: 2024-08-20