Does gitlab Pages support multiple repos to the same static website?

Hey, I recently came across gitlab pages, and was wonder if I can have multiple projects push their documentation to the same gitlab pages website?

This way we can keep all our docs with their respective projects, but have a central place to go to read them all.

Just want to see if it’s possible before I start diving in and doing it.


Hey @jayfry1077 this is an interesting idea! It’s possible, but not entirely simple.

I think what you need to do, is when you update a project (say, by merging an MR into the default branch), it should trigger a child pipeline in the pages project. There’s a less formal intro to parent/child pipelines on the blog.

That pipeline will need to pull code from the project repo, and then generate the HTML for the page and deploy it.

You might need to think a bit about how the pages repo should clone / pull / … the code from the projects. It might be useful to look at this post which is a good example of how to perform Git operations from inside a pipeline.

1 Like