diff --git a/.readthedocs.yml b/.readthedocs.yml index 69076d24..afa0a5d6 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -9,10 +9,19 @@ build: os: "ubuntu-24.04" tools: python: "3.13" + jobs: + post_checkout: + # Set up symbolic link based on RTD project name + - | + if [ "$PROJECT_VERSION" = "brainpy-version2" ]; then + ln -sf docs_version2 docs_build + else + ln -sf docs docs_build + fi -# Build documentation in the docs/ directory with Sphinx +# Build documentation using the symlinked directory sphinx: - configuration: docs/conf.py + configuration: docs_build/conf.py # Optionally set the version of Python and requirements required to build your docs python: diff --git a/docs_version2/.readthedocs.yml b/docs_version2/.readthedocs.yml deleted file mode 100644 index ecf09a2d..00000000 --- a/docs_version2/.readthedocs.yml +++ /dev/null @@ -1,21 +0,0 @@ -# .readthedocs.yml -# Read the Docs configuration file -# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details - -# Required -version: 2 - -build: - os: "ubuntu-24.04" - tools: - python: "3.13" - -# Build documentation in the docs/ directory with Sphinx -sphinx: - configuration: docs_version2/conf.py - -# Optionally set the version of Python and requirements required to build your docs -python: - install: - - requirements: ../requirements-doc.txt -