Skip to content

Commit 11b86cd

Browse files
Run docs workflow inside virtualenv to pick up sphinx-build
1 parent 035e679 commit 11b86cd

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/scripts/build_docs.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ git update-index --refresh
2626
git diff-index --quiet HEAD --
2727
test -z "$(git ls-files --exclude-standard --others)"
2828
echo Rebuilding docs
29-
${PYTHON} "${DOCS_DIR}/rebuild_docs.py" --warnings_as_errors
29+
30+
# Have to be in the virtualenv for sphinx-build to be picked up.
31+
source "${VENV_DIR}"/bin/activate
32+
python "${DOCS_DIR}/rebuild_docs.py" --warnings_as_errors
3033
echo Checking if files generated by rebuild_docs need to be checked in
3134
git diff
3235
git update-index --refresh

docs/rebuild_docs.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@
5959
if args.warnings_as_errors:
6060
cmdargs.append('SPHINXOPTS="-W"')
6161

62-
sphinx_build = shutil.which("sphinx-build")
63-
cmdargs.append(f"SPHINXBUILD={sphinx_build}")
6462
subprocess.check_call(cmdargs)
6563

6664
# Copy

0 commit comments

Comments
 (0)