language: python
sudo: false
cache:
  directories:
    - $HOME/.cache/pip
python:
  - "2.7"
  - "3.4"
  - "3.5"
  - "3.6"
  - "nightly"
  - "pypy"

env:
  global:
    - TEST=-v
  matrix:
    - DOCUTILS=0.12
    - DOCUTILS=0.13.1
    - DOCUTILS=0.14

matrix:
  exclude:
    - python: "3.4"
      env: DOCUTILS=0.12
    - python: "3.5"
      env: DOCUTILS=0.12
    - python: "3.6"
      env: DOCUTILS=0.12
    - python: nightly
      env: DOCUTILS=0.12
    - python: pypy
      env: DOCUTILS=0.12

install:
  - pip install -U pip
  - pip install docutils==$DOCUTILS
  - pip install -r requirements.txt

script:
  - make -C demo html

language: python
sudo: false
cache:
  directories:
    - $HOME/.cache/pip
python:
  - "2.7"
  - "3.4"
  - "3.5"
  - "3.6"
  - "nightly"
  - "pypy"

env:
  global:
    - TEST=-v
  matrix:
    - DOCUTILS=0.12
    - DOCUTILS=0.13.1
    - DOCUTILS=0.14

matrix:
  exclude:
    - python: "3.4"
      env: DOCUTILS=0.12
    - python: "3.5"
      env: DOCUTILS=0.12
    - python: "3.6"
      env: DOCUTILS=0.12
    - python: nightly
      env: DOCUTILS=0.12
    - python: pypy
      env: DOCUTILS=0.12

install:
  - pip install -U pip
  - pip install docutils==$DOCUTILS
  - pip install -r requirements.txt

script:
  - make -C demo html

deploy:
  provider: pages
  skip_cleanup: true
  github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
  local_dir: demo/build/html/
  on:
    branch: master
    python: 3.5

Deploy doc on Github pages
Deploy doc on Github pages
