Skip to content

Commit

Permalink
docs: Specify the javascript to ensure locally building docs doesn't …
Browse files Browse the repository at this point in the history
…have any errors.

Also, removed the FAIL_ON_ACCESS_ERROR env var from the insiders installation script, since the token isn't available for PR builds on ReadtheDocs.
  • Loading branch information
nfelt14 committed Nov 21, 2024
1 parent 7da8041 commit 7237e3d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ plugins:
inline_refs: none
markdown_links: true
- mermaid2:
version: 11.3.0
javascript: https://unpkg.com/mermaid@11.3.0/dist/mermaid.min.js
- mkdocstrings: # additional customization takes place in docs/generate_api_pages.py
# noinspection YAMLIncompatibleTypes
enabled: !ENV [TM_DEVICES_API_GENERATION, true]
Expand Down
7 changes: 0 additions & 7 deletions scripts/install_insiders_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"mkdocstrings-python": "https://github.com/pawamoy-insiders/mkdocstrings-python",
"griffe": "https://github.com/pawamoy-insiders/griffe",
}
FAIL_ON_ACCESS_ERROR = bool(os.getenv("FAIL_ON_ACCESS_ERROR"))


def get_github_tags(repo_url_str: str, github_token: str) -> List[str]:
Expand Down Expand Up @@ -102,9 +101,6 @@ def install_package(package_name: str, repo_url_str: str, tag: str, github_token
def main() -> None:
"""Install insiders packages."""
if not (github_token := os.environ.get("GITHUB_PAT")):
if FAIL_ON_ACCESS_ERROR:
msg = "\nGITHUB_PAT environment variable is not set, exiting with error"
raise SystemExit(msg)
logger.info(
"GITHUB_PAT environment variable is not set, no insiders packages will be installed."
)
Expand All @@ -131,9 +127,6 @@ def main() -> None:
install_package(package, repo_url, newest_tag, github_token)
else:
logger.info("No matching tags found for %s with version %s", package, version)
elif FAIL_ON_ACCESS_ERROR:
msg = f"\nFailed to access {repo_url}, exiting with error"
raise SystemExit(msg)


if __name__ == "__main__":
Expand Down

0 comments on commit 7237e3d

Please sign in to comment.