Files
NexQuant/.readthedocs.yaml
T

39 lines
1.5 KiB
YAML
Raw Normal View History

2024-08-09 17:25:38 +08:00
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.10"
2025-03-21 14:44:35 +08:00
# During the build process, you need to fetch tags, and since the default command to read the docs only pulls shallow code, it will cause an error.
# So we added the `git fetch --tags --unshallow || true` command to fetch the full tag record.
# Adding this command overrides the default command, so we copied it over to make sure the build was successful.
2025-03-20 11:39:19 +08:00
commands:
2025-03-21 14:44:35 +08:00
- python -mvirtualenv $READTHEDOCS_VIRTUALENV_PATH
- python -m pip install --upgrade --no-cache-dir pip setuptools
- python -m pip install --upgrade --no-cache-dir sphinx
- python -m pip install --exists-action=w --no-cache-dir -r requirements/docs.txt
- python -m pip install --upgrade --upgrade-strategy only-if-needed --no-cache-dir .
2025-03-20 11:39:19 +08:00
- git fetch --tags --unshallow || true
2025-03-21 14:44:35 +08:00
- mkdir -p $READTHEDOCS_OUTPUT/html/
- python -m sphinx -T -b html -d _build/doctrees -D language=en ./docs $READTHEDOCS_OUTPUT/html
2024-08-09 17:25:38 +08:00
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
# Build all formats
formats: all
# Optionally set the version of Python and requirements required to build your docs
python:
install:
2024-08-10 01:32:55 +08:00
- requirements: requirements/docs.txt
2024-08-09 17:25:38 +08:00
- method: pip
path: .