File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : linkcheck-pr
2+ on :
3+ pull_request :
4+ paths :
5+ - ' docs/**'
6+
7+ jobs :
8+ linkcheck :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v4
12+ - uses : dtcenter/metplus-action-linkcheck@v1
13+ with :
14+ fail-on-broken-links : ' true'
15+ upload-artifact : ' true'
Original file line number Diff line number Diff line change 1+ name : linkcheck-scheduled
2+ on :
3+ schedule :
4+ - cron : ' 0 6 * * 1'
5+ workflow_dispatch : {}
6+
7+ jobs :
8+ linkcheck :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v4
12+ - uses : dtcenter/metplus-action-linkcheck@v1
13+ with :
14+ fail-on-broken-links : ' true'
15+
Original file line number Diff line number Diff line change 9797numfig_format = {
9898 'figure' : 'Figure %s' ,
9999 }
100-
100+
101+ # -- linkcheck builder configuration ----------------------------------
102+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-the-linkcheck-builder
103+
104+ linkcheck_timeout = 10
105+ linkcheck_retries = 2
106+ linkcheck_workers = 8
107+
108+ linkcheck_ignore = [
109+ # add regex patterns for URLs that should be skipped, e.g.:
110+ # r'https://dtcenter\.org/.*', # if this site blocks automated requests
111+ # r'https://matplotlib\.org/.*', # occasionally rate-limits automated clients
112+ # r'https://scitools\.org\.uk/cartopy/.*', # occasionally slow
113+ # r'https://doi\.org/.*', # DOI redirectors often 403 non-browser requests
114+ ]
115+
116+ linkcheck_allowed_redirects = {
117+ # map of regex -> regex for redirects that are fine to follow
118+ }
119+
120+ linkcheck_anchors = True
121+ linkcheck_anchors_ignore = ['^!' ]
122+
101123# -- Export variables --------------------------------------------------------
102124
103125rst_epilog = """
You can’t perform that action at this time.
0 commit comments