Skip to content

Commit

Permalink
fix: add build cheatsheet as env variable within doc-build
Browse files Browse the repository at this point in the history
  • Loading branch information
Revathyvenugopal162 committed Oct 7, 2024
1 parent b06c7ae commit f052a4d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ env:
MAPDL_PACKAGE: ghcr.io/ansys/mapdl
ON_CI: True
PYTEST_ARGUMENTS: '-vvv -ra --durations=10 --maxfail=3 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html'
BUILD_CHEATSHEET: True

# Following env vars when changed will "reset" the mentioned cache,
# by changing the cache file name. It is rendered as ...-v%RESET_XXX%-...
Expand Down
14 changes: 10 additions & 4 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"sphinx_design",
"sphinx_jinja",
"sphinx_copybutton",
"sphinx_gallery.gen_gallery",
# "sphinx_gallery.gen_gallery",
"sphinxemoji.sphinxemoji",
"sphinx.ext.graphviz",
"ansys_sphinx_theme.extension.linkcode",
Expand Down Expand Up @@ -311,13 +311,19 @@
"json_url": f"https://{cname}/versions.json",
"version_match": switcher_version,
},
"cheatsheet": {
}

BUILD_CHEATSHEET = True if os.environ.get("BUILD_CHEATSHEET", "true") == "true" else False

if BUILD_CHEATSHEET:
html_theme_options["cheatsheet"] = {
"file": "cheat_sheet/cheat_sheet.qmd",
"title": "PyMAPDL cheat sheet",
"version": f"v{version}",
"pages": ["getting_started/learning"],
},
}
}



html_context = {
"display_github": True, # Integrate GitHub
Expand Down

0 comments on commit f052a4d

Please sign in to comment.