From accee675d5d3ed3eecd11c98cb0efad58c790820 Mon Sep 17 00:00:00 2001 From: Jonas Schuhmacher Date: Mon, 25 Mar 2024 17:42:16 +0100 Subject: [PATCH] improve script --- docs/conf.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 3c45d59..97301db 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -30,12 +30,14 @@ def configure_doxyfile(input_dir, output_dir): file.write(filedata) +# Check if we're running on Read the Docs' servers or in the GitHub Actions Workflow breathe_projects = {} -input_dir = "../src" -output_dir = "build" -configure_doxyfile(input_dir, output_dir) -subprocess.call("doxygen", shell=True) -breathe_projects["polyhedral-gravity-model"] = output_dir + "/xml" +if os.environ.get("READTHEDOCS", None) is not None or os.environ.get("GITHUB_PAGES_BUILD", None) is not None: + input_dir = "../src" + output_dir = "build" + configure_doxyfile(input_dir, output_dir) + subprocess.call("doxygen", shell=True) + breathe_projects["polyhedral-gravity-model"] = output_dir + "/xml" # -- Project information -----------------------------------------------------