Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seperate build and deploy of docs #31

Closed
Wolf2323 opened this issue Dec 6, 2020 · 4 comments
Closed

Seperate build and deploy of docs #31

Wolf2323 opened this issue Dec 6, 2020 · 4 comments

Comments

@Wolf2323
Copy link
Contributor

Wolf2323 commented Dec 6, 2020

Hello,

i am a user of https://github.com/squidfunk/mkdocs-material and we upgreaded to the insiders version, whitch also support mike.
Now we want to upgrade our build pipeline(GH Actions) so that it use mike for the versioning.

In the old build pipelien we we did run mkdocs build --site-dir="../build/documentation" and then we manualy deployed it in a seperate step to gh-pages. Now we need to run mike deploy but then we can not seperate the building from commit and push and this is a bad behavor for our complex buildpipeline.

Is there any way to split this in to seperate stages?

For more information you can also look at our build pipeline:
Building: https://github.com/BetonQuest/BetonQuest/blob/de10a21e367ce3cc4d0fb330777bf36e775ebe00/.github/workflows/build.yml#L215
Deploying: https://github.com/BetonQuest/BetonQuest/blob/master/.github/workflows/build.yml#L271
Deploy Script: https://github.com/BetonQuest/BetonQuest/blob/master/.github/scripts/mkdocs.sh

The point is that we build our project parallel with maven and mkdocs, and if both are successfull we deploy both.

For me it yould be perfect, if i can run a mike build command and then run mike deploy

@jimporter
Copy link
Owner

jimporter commented Dec 6, 2020

You don't have to push the commit from mike deploy immediately; you can do that later in a separate step. It'll still generate a local commit to your gh-pages branch, but if you don't push the commit, then nothing should change with your hosted docs. I think that should resolve the issue you mention here; unfortunately, there's not an easy way to completely separate the build from the commit in mike; the goal was to use Git branches to manage a lot of the complexity here.

@Wolf2323
Copy link
Contributor Author

Wolf2323 commented Dec 7, 2020

I understand, but i don't know, how i pass a commit to an other job of the same github action build pipeline

@jimporter
Copy link
Owner

There might be an easier way than this, but at worst, you could just upload the diff of the latest commit as your artifact, and then commit/push it on your deploy job.

@jimporter
Copy link
Owner

Closing this; I think my comment immediately above is the best solution here, barring some major changes to how mike works. If you need some more pointers on how to get this set up, feel free to comment again though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants