language: generic

python:
  - 3.6

install: 
  - pip install --user sphinx  # sphinx_rtd_theme
    # pypi's sphinx_rtd_theme is outdated. Internet recommends using current
    # master. Note: at some point, it will be OK to add `sphinx_rtd_theme` to
    # the `pip install` above => remove line below:
  - python -m pip install --user https://github.com/rtfd/sphinx_rtd_theme/archive/master.zip -U

script: bash ./build_and_deploy.sh

env:
  global:
  - COMMIT_AUTHOR_EMAIL: "jpblaschke@lbl.gov"

addons:
  apt:
    packages:
      - doxygen

deploy:
  provider: pages
  target-branch: gh-pages
  local-dir: docs/build
  skip-cleanup: true
  github-token: $GITHUB_TOKEN  # Set in travis-ci.org dashboard, marked secure
  keep-history: true
  verbose: true
  on:
    branch: master
