image: python:3.6

cache:
  paths:
    - .pip

before_script:
  - mkdir -p .pip
  - pip install -U pip
  - pip --cache-dir=.pip install sphinx
  - pip --cache-dir=.pip install sphinx-autodoc-typehints
  - pip --cache-dir=.pip install sphinx_rtd_theme
  - pip --cache-dir=.pip install -r requirements.txt
  
pages:
  script:
  - sphinx-build docs/source docs/build/html
  - mv docs/build/html public
  artifacts:
    paths:
    - public
  only:
  - master