Skip to content

Commit 02aef1b

Browse files
committed
fix: Output Sphinx docs to RTD-required directory
Read the Docs requires HTML output to be written to $READTHEDOCS_OUTPUT/html/ when using custom build commands. Changes: - Add mkdir -p $READTHEDOCS_OUTPUT/html/ before build - Change sphinx-build output from docs/_build/html to $READTHEDOCS_OUTPUT/html This fixes the "No HTML content found" error on RTD builds. Ref: https://docs.readthedocs.com/platform/stable/build-customization.html#where-to-put-files
1 parent 416206d commit 02aef1b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

readthedocs.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@ build:
99
- bash .github/scripts/rtd-download-artifacts.sh
1010
# Install package with all extras needed for docs
1111
- pip install -e ".[dev,twisted,compress,serialization,encryption,scram]"
12-
# Build Sphinx documentation
13-
- cd docs && sphinx-build -b html . _build/html
12+
# Create RTD output directory (required by RTD)
13+
- mkdir -p $READTHEDOCS_OUTPUT/html/
14+
# Build Sphinx documentation to RTD output directory
15+
- cd docs && sphinx-build -b html . $READTHEDOCS_OUTPUT/html

0 commit comments

Comments
 (0)