diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index ec3cf67f..ea56302f 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -28,12 +28,12 @@ jobs: python -m pip install -r docs/requirements.txt - name: Build docs run: ./.github/jobs/build_documentation.sh - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 if: always() with: name: documentation path: artifact/documentation - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 if: failure() with: name: documentation_warnings.log diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml new file mode 100644 index 00000000..305c6dce --- /dev/null +++ b/.github/workflows/linkcheck.yml @@ -0,0 +1,19 @@ +name: Linkcheck +on: + schedule: + - cron: '0 6 * * 1' + pull_request: + paths: + - 'docs/**' + workflow_dispatch: {} + +jobs: + linkcheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: dtcenter/metplus-action-linkcheck@v1 + with: + fail-on-broken-links: 'true' + upload-artifact: 'true' + install-package: 'true' \ No newline at end of file diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 26852760..12bd051d 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -54,7 +54,7 @@ jobs: coverage html - name: Archive code coverage results - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: code-coverage-report_py${{ matrix.python-version }} path: htmlcov/index.html diff --git a/.github/workflows/version_tests.yaml b/.github/workflows/version_tests.yaml index ba3086cf..c90d186a 100644 --- a/.github/workflows/version_tests.yaml +++ b/.github/workflows/version_tests.yaml @@ -55,7 +55,7 @@ jobs: coverage html - name: Archive code coverage results - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: code-coverage-report path: htmlcov/index.html diff --git a/docs/conf.py b/docs/conf.py index b0a81420..570b4c5e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -99,7 +99,28 @@ numfig_format = { 'figure': 'Figure %s', } - + +# -- linkcheck builder configuration ---------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-the-linkcheck-builder + +linkcheck_timeout = 10 +linkcheck_retries = 2 +linkcheck_workers = 8 + +linkcheck_ignore = [ + # add regex patterns for URLs that should be skipped, e.g.: + # r'https://dtcenter\.org/.*', # if this site blocks automated requests + # r'https://doi\.org/.*', + # r'https://journals\.ametsoc\.org/.*', # AMS journal site blocks bot user-agents +] + +linkcheck_allowed_redirects = { + # map of regex -> regex for redirects that are fine to follow +} + +linkcheck_anchors = True +linkcheck_anchors_ignore = ['^!'] + # -- Export variables -------------------------------------------------------- rst_epilog = """