diff --git a/.github/workflows/test-docs.yml b/.github/workflows/test-docs.yml index a159c3c8..0feed9eb 100644 --- a/.github/workflows/test-docs.yml +++ b/.github/workflows/test-docs.yml @@ -72,3 +72,22 @@ jobs: run: | cd docs make linkcheck + + - name: check redirects for this PR + run: | + cd docs + make rediraffecheckdiff + + # this should check currently published 'stable' links for redirects + - name: check redirects since last release + run: | + cd docs + export REDIRAFFE_BRANCH=$(git describe --tags --abbrev 0) + make rediraffecheckdiff + + # longer-term redirect check (fixed version) for older links + - name: check redirects since 3.0.0 + run: | + cd docs + export REDIRAFFE_BRANCH=3.0.0 + make rediraffecheckdiff diff --git a/docs/source/conf.py b/docs/source/conf.py index c3c3958b..a236bd4e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -235,7 +235,7 @@ ogp_use_first_image = True # If you are basing changes off another branch/ commit, always change back # rediraffe_branch to main before pushing your changes upstream. # -rediraffe_branch = "main" +rediraffe_branch = os.environ.get("REDIRAFFE_BRANCH", "main") rediraffe_redirects = "redirects.txt" # rediraffe_redirects = { # "old-file": "new-folder/new-file-name",