@@ -227,27 +227,30 @@ state, pass `--rebase`.
227
227
Some special files that you'd like to deploy along with your documentation (such
228
228
as ` CNAME ` ) aren't related to a particular version of the docs, and instead need
229
229
to 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
231
231
manage: check out your ` gh-pages ` branch (or wherever your built docs
232
232
live), and commit the necessary files to the root directory.
233
233
234
234
## Deploying via CI
235
235
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
237
237
smoothly with your favorite CI system. However, you should keep in mind that
238
238
some CI systems make shallow clones of your repository, meaning that the CI job
239
239
won't have a local instance of your documentation branch to commit to. This will
240
240
naturally 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:
242
243
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]
251
254
```
252
255
253
256
## For Theme Authors
@@ -288,3 +291,4 @@ This project is licensed under the [BSD 3-clause license](LICENSE).
288
291
[ shtab ] : https://github.com/iterative/shtab
289
292
[ shtab-setup ] : https://github.com/iterative/shtab#cli-usage
290
293
[ 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