version: 2

build:
  apt_packages:
    - "graphviz"
  os: "ubuntu-20.04"
  tools:
    python: "mambaforge-4.10"
  jobs:
    post_checkout:
      - git fetch --unshallow || true
      - git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*' || true
      - git fetch --all --tags || true
    pre_install:
      - git update-index --assume-unchanged docs/rtd_environment.yaml docs/conf.py
    post_install:
      - git describe --exact-match || towncrier build --keep

conda:
  environment: docs/rtd_environment.yaml

sphinx:
  builder: html
  fail_on_warning: true
  configuration: docs/conf.py

python:
  install:
    - method: pip
      path: .
      extra_requirements:
        - docs

# No extra formats
formats: []
