diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3dd4acf..b6fa487 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,20 +12,6 @@ jobs: - uses: actions/setup-python@v5 with: python-version: 3.12 - - name: Figure out IP - run: | - curl https://ipinfo.io - - name: Try curl to get to opensource.org - run: | - curl -I https://opensource.org/ \ - -v \ - --http1.1 \ - -H "Host: opensource.org" \ - -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36" \ - -H "Accept-Encoding: gzip, deflate" \ - -H "Accept: */*" \ - -H "Connection: keep-alive" - - name: Install Requirements run: | pip install --upgrade pip diff --git a/conf.py b/conf.py index d18ec10..936f28e 100644 --- a/conf.py +++ b/conf.py @@ -2,9 +2,10 @@ # Here it is useful to allow the configuration to be maintained elsewhere # from starterkit_ci.sphinx_config import * # NOQA -import http.client +import os + +IN_GITHUB_ACTIONS_CI = os.environ.get("GITHUB_ACTIONS", False) -# http.client.HTTPConnection.debuglevel = 1 project = "Key4hep" copyright = "2020, Key4hep" @@ -39,18 +40,13 @@ ".md": "markdown", } -# html_static_path += [ -# f'_static', -# ] - - -# linkcheck_request_headers = { -# "https://opensource.org": {"User-Agent": "Python-urllib/3.12"} -# } - linkcheck_ignore = [ r"https://twiki.cern.ch/twiki/bin/view", # TWikis might need login ] +if IN_GITHUB_ACTIONS_CI: + linkcheck_ignore.append( + r"https://opensource.org", # cloudflare blocks requests from github actions + ) myst_heading_anchors = 3