Skip to content

Commit 1b533ee

Browse files
authored
fix(docs): run sphinx-build inside poetry venv (#178)
Install docs dependencies and run sphinx-build through poetry run so that project packages (orjson, etc.) are available to conf.py.
1 parent 94e5601 commit 1b533ee

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/docs.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
run: poetry install --all-extras
4545

4646
- name: Install docs dependencies
47-
run: pip install -r docs/requirements.txt
47+
run: poetry run pip install -r docs/requirements.txt
4848

4949
- name: Build versioned documentation
5050
run: |
@@ -72,8 +72,8 @@ jobs:
7272
fi
7373
7474
git checkout "$tag" -- docs/ examples/ || git checkout "$tag" -- docs/
75-
python docs/copy_notebooks.py || true
76-
sphinx-build -b html docs "$OUTPUT_DIR/$tag"
75+
poetry run python docs/copy_notebooks.py || true
76+
poetry run sphinx-build -b html docs "$OUTPUT_DIR/$tag"
7777
git checkout HEAD -- docs/ examples/ 2>/dev/null || git checkout HEAD -- docs/
7878
7979
if [ -z "$LATEST_TAG" ]; then
@@ -89,8 +89,8 @@ jobs:
8989
# Build docs for main (current HEAD)
9090
echo "=== Building docs for main ==="
9191
git checkout HEAD -- docs/ examples/ 2>/dev/null || true
92-
python docs/copy_notebooks.py
93-
sphinx-build -b html docs "$OUTPUT_DIR/main"
92+
poetry run python docs/copy_notebooks.py
93+
poetry run sphinx-build -b html docs "$OUTPUT_DIR/main"
9494
9595
VERSIONS_JSON=$(echo "$VERSIONS_JSON" | python3 -c "
9696
import json, sys

0 commit comments

Comments
 (0)