Skip to content

Commit f052a4d

Browse files
fix: add build cheatsheet as env variable within doc-build
1 parent b06c7ae commit f052a4d

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ env:
3434
MAPDL_PACKAGE: ghcr.io/ansys/mapdl
3535
ON_CI: True
3636
PYTEST_ARGUMENTS: '-vvv -ra --durations=10 --maxfail=3 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html'
37+
BUILD_CHEATSHEET: True
3738

3839
# Following env vars when changed will "reset" the mentioned cache,
3940
# by changing the cache file name. It is rendered as ...-v%RESET_XXX%-...

doc/source/conf.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
"sphinx_design",
100100
"sphinx_jinja",
101101
"sphinx_copybutton",
102-
"sphinx_gallery.gen_gallery",
102+
# "sphinx_gallery.gen_gallery",
103103
"sphinxemoji.sphinxemoji",
104104
"sphinx.ext.graphviz",
105105
"ansys_sphinx_theme.extension.linkcode",
@@ -311,13 +311,19 @@
311311
"json_url": f"https://{cname}/versions.json",
312312
"version_match": switcher_version,
313313
},
314-
"cheatsheet": {
314+
}
315+
316+
BUILD_CHEATSHEET = True if os.environ.get("BUILD_CHEATSHEET", "true") == "true" else False
317+
318+
if BUILD_CHEATSHEET:
319+
html_theme_options["cheatsheet"] = {
315320
"file": "cheat_sheet/cheat_sheet.qmd",
316321
"title": "PyMAPDL cheat sheet",
317322
"version": f"v{version}",
318323
"pages": ["getting_started/learning"],
319-
},
320-
}
324+
}
325+
326+
321327

322328
html_context = {
323329
"display_github": True, # Integrate GitHub

0 commit comments

Comments
 (0)