jimporter / mike

Manage multiple versions of your MkDocs-powered documentation via Git
BSD 3-Clause "New" or "Revised" License
534 stars 47 forks source link

GitHub Action example #79

Closed jwillmer closed 2 years ago

jwillmer commented 2 years ago

I try to setup mkdocs with mike (versions) with GitHub actions but do not find any examples - it's the first time I play around with mkdocs. Can anyone provide one so I don't need to spend time on figuring it out by my self? Maybe we should add it into the documentation of mike?

jimporter commented 2 years ago

I don't think there's a one-size-fits-most solution here, since no example can really explain how your CI will determine the version to deploy. Once you've solved that though, it's mostly a matter of running mike deploy VERSION --push.

There are some subtleties with checking out the gh-pages branch and setting up a user (as documented here), but those are really just general things that apply to any Github Action. I'm not sure there's much more I could add beyond taking the linked section about deploying to CI and just gluing it together into a single snippet...

jwillmer commented 2 years ago

I already fixed it myself. For future reference anyone who sees this issue can look at https://github.com/RemoteCloud/public-documentation for some example.