Skip to content

Commit

Permalink
fix: add build cheatsheet as env variable within doc-build (#3468)
Browse files Browse the repository at this point in the history
* fix: add build cheatsheet as env variable within doc-build

* chore: adding changelog file 3468.fixed.md

* fix: precommit

* fix: add suggestions

Co-authored-by: German <[email protected]>

* ci: auto fixes from pre-commit.com hooks.

for more information, see https://pre-commit.ci

* ci: retrigger CICD

* feat: use false as default.

Co-authored-by: Camille <[email protected]>

---------

Co-authored-by: pyansys-ci-bot <[email protected]>
Co-authored-by: German <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Camille <[email protected]>
  • Loading branch information
5 people authored Oct 7, 2024
1 parent 4c8f600 commit 24b3a13
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 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
1 change: 1 addition & 0 deletions doc/changelog.d/3468.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fix: add ``build cheatsheet`` as env variable within doc-build
10 changes: 7 additions & 3 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,17 @@
"json_url": f"https://{cname}/versions.json",
"version_match": switcher_version,
},
"cheatsheet": {
}

BUILD_CHEATSHEET = os.environ.get("BUILD_CHEATSHEET", "false").lower() == "true"

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 24b3a13

Please sign in to comment.