If you want a simple way to automate building your documentation, then this post is for you. We will be using Sphinx, Travis CI, and GitHub.
.travis.yml
file in the root directory of your repository. #language: python
install:
- pip install -r requirements.txt
script:
# Use Sphinx to make the html docs
- make html
# Tell GitHub not to use jekyll to compile the docs
- touch _build/html/.nojekyll
# Tell Travis CI to copy the documentation to the gh-pages branch of
# your GitHub repository.
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard, marked secure
keep-history: true
on:
branch: master
local_dir: _build/html/