Skip to content

Instantly share code, notes, and snippets.

@meyt
Created June 29, 2018 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meyt/56c6bcb3a129a0bfb5c97c8f4fb30531 to your computer and use it in GitHub Desktop.
Save meyt/56c6bcb3a129a0bfb5c97c8f4fb30531 to your computer and use it in GitHub Desktop.
Deploy sphinx output to github pages by travis [python ]
# - Create personal access token from your github settings > developer section with `public_repo` scope
# - Add environemnt variable on travis with key name `GITHUB_ACCESS_TOKEN` and already created personal access token value.
language: python
python:
- 3.3
- 3.4
- 3.5
- 3.6
- nightly
before_install:
- pip install -U pip setuptools wheel
install: pip install -e .
script:
- coverage run --source <YOUR_PYTHON_MODULE_NAME> $(which nosetests)
after_success: if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then
pip install -r requirements-doc.txt &&
sphinx-build -nW -b html doc doc/_build/html &&
touch doc/_build/html/_static/.nojekyll &&
travis_retry coveralls ; fi
deploy:
provider: pages
skip-cleanup: true
github-token: $GITHUB_ACCESS_TOKEN
target-branch: gh-pages
local-dir: doc/_build/html
on:
branch: master
condition: $TRAVIS_PYTHON_VERSION = '3.5'
sphinx
sphinx_rtd_theme
sphinx-autobuild
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment