From 39576d695cf6a6bef854ee50d0d50481e639d5e3 Mon Sep 17 00:00:00 2001 From: redteampanda-ng <31235211+redteampanda-ng@users.noreply.github.com> Date: Thu, 18 Jul 2024 06:19:11 +0200 Subject: [PATCH] chore: add github workflows for linkcheck chore: add changes for new rtd build process --- .github/workflows/pre-checks.yml | 25 +++++++++++++++++++++++++ conf.py | 9 ++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pre-checks.yml diff --git a/.github/workflows/pre-checks.yml b/.github/workflows/pre-checks.yml new file mode 100644 index 0000000..aa798e9 --- /dev/null +++ b/.github/workflows/pre-checks.yml @@ -0,0 +1,25 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Manual Pre Checks + +on: + push: + branches: + - "*" + pull_request: + branches: + - main + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + linkcheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: link-check + run: | + pip install -r requirements.txt + make linkcheck + diff --git a/conf.py b/conf.py index 1d0148f..7345ebf 100644 --- a/conf.py +++ b/conf.py @@ -1,10 +1,11 @@ +import os + project = 'THOR Cloud Microsoft Defender for Endpoint' version="1.0" copyright = '2021, Nextron Systems GmbH' author = 'Nextron Systems GmbH' extensions = [ 'sphinx.ext.autosectionlabel', - 'sphinx_rtd_theme' ] templates_path = ['_templates'] source_suffix = '.rst' @@ -20,6 +21,12 @@ html_favicon = "images/html/favicon.ico" html_static_path = ['_static'] html_css_files = ['css/custom.css',] +html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "") +if os.environ.get("READTHEDOCS", "") == "True": + if "html_context" not in globals(): + html_context = {} + html_context["READTHEDOCS"] = True + epub_title = project epub_exclude_files = ['search.html'] intersphinx_mapping = {'https://docs.python.org/': None}