Skip to content

Commit 21aab9c

Browse files
committed
Add a note to the README about CI
1 parent 81fc303 commit 21aab9c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

+19
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,25 @@ in mike, but since your built docs live on a git branch, it's still easy to
231231
manage: check out your `gh-pages` branch (or wherever your built docs
232232
live), and commit the necessary files to the root directory.
233233

234+
## Deploying via CI
235+
236+
Since mike just generates commits to an ordinary git branch, it should work
237+
smoothly with your favorite CI system. However, you should keep in mind that
238+
some CI systems make shallow clones of your repository, meaning that the CI job
239+
won't have a local instance of your documentation branch to commit to. This will
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:
242+
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+
# ...
251+
```
252+
234253
## For Theme Authors
235254

236255
If you'd like to provide support for mike in your theme, you just need to

0 commit comments

Comments
 (0)