image: python:3.6

publish:
  script:
    - pip install sphinx
    - pip install sphinxcontrib-httpdomain
    - pip install sphinx_rtd_theme
    - pip install recommonmark
    - sphinx-build -d html "source" "build"
    - echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
    - scp -i gitlab.key -o StrictHostKeyChecking=no -r build/* documentation@astral.startinblox.com:~/doc/
  only:
    - master
  tags:
    - deploy