Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f4fb6c9

Browse files
committed
env var
1 parent dfff80c commit f4fb6c9

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

docs/source/conf.py

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,25 +45,28 @@
4545
"sphinx_copybutton",
4646
"sphinx_design",
4747
"sphinx_gallery.gen_gallery",
48-
"rtds_action",
4948
]
5049

51-
# The name of your GitHub repository
52-
rtds_action_github_repo = "fastplotlib/fastplotlib"
5350

54-
# The path where the artifact should be extracted
55-
# Note: this is relative to the conf.py file!
56-
rtds_action_path = "_gallery"
51+
if "RTD_BUILD" in os.environ.keys():
52+
extensions.append("rtds_action")
5753

58-
# The "prefix" used in the `upload-artifact` step of the action
59-
rtds_action_artifact_prefix = "gallery-"
54+
# The name of your GitHub repository
55+
rtds_action_github_repo = "fastplotlib/fastplotlib"
6056

61-
# A GitHub personal access token is required, more info below
62-
rtds_action_github_token = os.environ["GITHUB_TOKEN"]
57+
# The path where the artifact should be extracted
58+
# Note: this is relative to the conf.py file!
59+
rtds_action_path = "_gallery"
6360

64-
# Whether or not to raise an error on Read the Docs if the
65-
# artifact containing the notebooks can't be downloaded (optional)
66-
rtds_action_error_if_missing = False
61+
# The "prefix" used in the `upload-artifact` step of the action
62+
rtds_action_artifact_prefix = "gallery-"
63+
64+
# A GitHub personal access token is required, more info below
65+
rtds_action_github_token = os.environ["GITHUB_TOKEN"]
66+
67+
# Whether or not to raise an error on Read the Docs if the
68+
# artifact containing the notebooks can't be downloaded (optional)
69+
rtds_action_error_if_missing = False
6770

6871

6972
sphinx_gallery_conf = {

0 commit comments

Comments
 (0)