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
mainbranch for GitHub Pages anddevbranch which is published on a custom domain on a VPS.Please ignore the failing
mainbranch badge 😅, there is a delay on the review of thedevbranch so it wasn't merged back.mainworkflow modifies thegh-pagesbranch, which is later deployed via GitHub Actionsdevworkflow modifies thegh-dev-pagebranch, 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…