-
Hello, I am using mike with mkdocs-material. I have gh-deploy setup with two jobs: job1
job2
The goal is to have a 1.0 version which is latest (main) and a version 2.0 which is based on release/v2.0 branch. It works fine when I commit to main (it becomes latest, 1.0 in the mkdocs version chooser). When I commit to release/v2.0 it switches to 2.0 in the mkdocs chooser, as if it is completely overwriting the gh-pages branch which is what is processed via github actions to make my site. My goal is to be able to independently commit to 1.0 or 2.0 and the gh pages should be updated with the rendered docs. I will manage the content differences between 1.0 and 2.0 via git merges, and eventually make 1.0 locked for edits. This seems like a common workflow, where the support team is constantly improving existing docs (1.0) but development wants to start updating for a new version (2.0). Yet I must be doing something wrong because of the overwriting issue above. Any ideas what I might be doing wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Another option I tried was do run mike deploy, and then checkout the other branch and do another deploy to a new version, but I couldn't get it to work properly. |
Beta Was this translation helpful? Give feedback.
-
Why are you using |
Beta Was this translation helpful? Give feedback.
Why are you using
mkdocs gh-deploy
? It removes the entire contents of thegh-pages
branch when calling it, so you'll lose any existing versioned documentation as well.