---
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

version: 2

build:
  os: ubuntu-24.04
  tools:
    python: "miniconda-latest"
  commands:
    - |
      if [ -f readthedocs_build.sh ]; then
        doxyconfig_dir="."
      else
        doxyconfig_dir="./third-party/doxyconfig"
      fi
      chmod +x "${doxyconfig_dir}/readthedocs_build.sh"
      export DOXYCONFIG_DIR="${doxyconfig_dir}"
      "${doxyconfig_dir}/readthedocs_build.sh"

# using conda, we can get newer doxygen and graphviz than ubuntu provide
# https://github.com/readthedocs/readthedocs.org/issues/8151#issuecomment-890359661
conda:
  environment: third-party/doxyconfig/environment.yml

submodules:
  include: all
  recursive: true
