File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,8 @@ jobs:
125
125
linkcheck :
126
126
name : Link Check
127
127
runs-on : ubuntu-latest
128
+ permissions :
129
+ contents : read
128
130
steps :
129
131
- uses : actions/checkout@v4
130
132
with :
@@ -139,6 +141,8 @@ jobs:
139
141
- name : Install dependencies
140
142
run : just install
141
143
- name : Build docs
144
+ env :
145
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
142
146
run : just docs-linkcheck
143
147
144
148
typing :
Original file line number Diff line number Diff line change 4
4
# This file is execfile()d with the current directory set to its containing dir.
5
5
from __future__ import annotations
6
6
7
+ import os
7
8
import sys
8
9
from pathlib import Path
9
10
91
92
r"https://sourceforge.net/" ,
92
93
]
93
94
95
+ # Add GitHub auth if available to avoid rate limiting.
96
+ if "GH_TOKEN" in os .environ :
97
+ token = os .environ ["GH_TOKEN" ]
98
+ linkcheck_request_headers = {r"https://github.\.com/.+" : {"authorization" : f"Bearer ${ token } " }}
99
+
100
+ # Allow for flakey links.
101
+ linkcheck_retries = 2
102
+
94
103
# -- Options for extensions ----------------------------------------------------
95
104
autoclass_content = "init"
96
105
You can’t perform that action at this time.
0 commit comments