@@ -227,27 +227,30 @@ state, pass `--rebase`.
227227Some special files that you'd like to deploy along with your documentation (such
228228as ` CNAME ` ) aren't related to a particular version of the docs, and instead need
229229to go in the root directory of your site. There's no special handling for this
230- in mike, but since your built docs live on a git branch, it's still easy to
230+ in mike, but since your built docs live on a Git branch, it's still easy to
231231manage: check out your ` gh-pages ` branch (or wherever your built docs
232232live), and commit the necessary files to the root directory.
233233
234234## Deploying via CI
235235
236- Since mike just generates commits to an ordinary git branch, it should work
236+ Since mike just generates commits to an ordinary Git branch, it should work
237237smoothly with your favorite CI system. However, you should keep in mind that
238238some CI systems make shallow clones of your repository, meaning that the CI job
239239won't have a local instance of your documentation branch to commit to. This will
240240naturally cause issues when trying to push the commit. This is easy to resolve
241- though. For Github Actions, you can simply disable shallow clones:
241+ though; just manually fetch your ` gh-pages ` branch (or whichever you deploy to)
242+ before running mike:
242243
243- ``` yaml
244- jobs :
245- deploy-docs :
246- steps :
247- - uses : actions/checkout@v2
248- with :
249- fetch-depth : 0 # fetch all commits/branches
250- # ...
244+ ``` sh
245+ git fetch origin gh-pages --depth=1
246+ ```
247+
248+ You may also need to [ configure a Git user] [ gh-action-commit ] so that mike can
249+ make commits:
250+
251+ ``` sh
252+ git config user.name ci-bot
253+ git config user.email
[email protected] 251254```
252255
253256## For Theme Authors
@@ -288,3 +291,4 @@ This project is licensed under the [BSD 3-clause license](LICENSE).
288291[ shtab ] : https://github.com/iterative/shtab
289292[ shtab-setup ] : https://github.com/iterative/shtab#cli-usage
290293[ jinja ] : https://jinja.palletsprojects.com/
294+ [ gh-action-commit ] : https://github.com/actions/checkout#push-a-commit-using-the-built-in-token
0 commit comments