version: 2
jobs:
  build:
    docker:
      - image: circleci/python:3.8
    steps:
      - checkout
      - run:
          name: Build documentation
          command: ./build_tools/circle/build_doc.sh
          timeout: "3600"
      - store_artifacts:
          path: doc/_build/html
      - add_ssh_keys:
          fingerprints:
            - "36:ae:e2:2f:a7:11:f1:3f:d5:45:1d:c1:ef:55:0b:9d"
      - deploy:
          name: Deploy documentation
          environment:
            USERNAME: darcymason
            EMAIL: darcymason@gmail.com
          command: ./build_tools/circle/push_doc.sh
