aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2022-02-21 20:48:45 +0400
committerGravatar Hassan Abouelela <[email protected]>2022-02-21 21:04:53 +0400
commit146c4873895923cd3e29acd6db6304c6200db0c6 (patch)
treea9e688f747e2a9f271a376e8da1e6ca2f16595b1 /docs
parentRevert Breaking Doc Changes (diff)
Explicitly Specify Path In Docs Build
Sphinx build in GitHub actions was not adding the path of the file being run, or the working directory, or anything else to sys.path, which broke imports.
Diffstat (limited to 'docs')
-rw-r--r--docs/conf.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 23feab31..efc555c1 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -2,6 +2,7 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html
import functools
+import os.path
import sys
from pathlib import Path
@@ -9,7 +10,10 @@ import git
import tomli
from sphinx.application import Sphinx
-from docs import utils
+# Handle the path not being set correctly in actions.
+sys.path.insert(0, os.path.abspath('..'))
+
+from docs import utils # noqa: E402
# -- Project information -----------------------------------------------------