Multi-branch deployment #7852
-
Hi there How can I deploy my mkdocs-material site on different branches at the same time so a person can view my mkdocs documentation in different branch versions? Greedings |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hello @opensource-coder909, MkDocs generates static HTML files, so as long as you properly set the root of the page via the site_url option, then you could include multiple sites on one GitHub Pages instance which would differ in the root directory. You can look at versioning, which applies the same principle of having multiple versions of the page available:
Each branch you have could be a different version. |
Beta Was this translation helpful? Give feedback.
Depends on the backend, deployment solution you're using, and your plans, in general that's possible.
Gothic Modding Community uses a
main
branch for GitHub Pages anddev
branch which is published on a custom domain on a VPS.Please ignore the failing
main
branch badge 😅, there is a delay on the review of thedev
branch so it wasn't merged back.main
workflow modifies thegh-pages
branch, which is later deployed via GitHub Actionsdev
workflow modifies thegh-dev-page
branch, where a webhook detects the changes and the vps fetches the changes (that's my understanding of it, I'm not the maintainer of t…