From 146c4873895923cd3e29acd6db6304c6200db0c6 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela Date: Mon, 21 Feb 2022 20:48:45 +0400 Subject: 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. --- docs/conf.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'docs/conf.py') 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 ----------------------------------------------------- -- cgit v1.2.3