diff --git a/.readthedocs.yml b/.readthedocs.yml index baa32651..c5f0bee3 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -8,6 +8,16 @@ build: os: "ubuntu-22.04" tools: python: "3.10" + jobs: + #build an environment + pre-build: + - "export CUSTOM_ENV_DIR= /docs/build/" + - "mkdir -p $CUSTOM_ENV_DIR" + - "conda env create -p $CUSTOM_ENV_DIR -f docs/source/environment.yml" + - "export READTHEDOCS_VIRTUALENV_PATH=$CUSTOM_ENV_DIR" + post_build: + # Run the build commands within the specified environment + - "conda run -p $READTHEDOCS_VIRTUALENV_PATH sphinx-build -M html docs/source/ docs/build/" python: install: @@ -23,13 +33,3 @@ sphinx: fail_on_warning: false -jobs: - #build an environment - pre-install: - - "export CUSTOM_ENV_DIR= /docs/build/" - - "mkdir -p $CUSTOM_ENV_DIR" - - "conda env create -p $CUSTOM_ENV_DIR -f docs/source/environment.yml" - - "export READTHEDOCS_VIRTUALENV_PATH=$CUSTOM_ENV_DIR" - post_install: - # Run the build commands within the specified environment - - "conda run -p $READTHEDOCS_VIRTUALENV_PATH sphinx-build -M html docs/source/ docs/build/" \ No newline at end of file