| 246 | }, |
| 247 | ) |
| 248 | def linkcheck(ctx: Context, no_clean: bool = False, no_color: bool = False): |
| 249 | if no_clean is False: |
| 250 | ctx.run("make", "clean", cwd="doc/", check=True) |
| 251 | opts = [ |
| 252 | "-W", |
| 253 | "-j", |
| 254 | "auto", |
| 255 | "--keep-going", |
| 256 | ] |
| 257 | if no_color is False: |
| 258 | opts.append("--color") |
| 259 | ctx.run( |
| 260 | "make", |
| 261 | "linkcheck", |
| 262 | f"SPHINXOPTS={' '.join(opts)}", |
| 263 | cwd="doc/", |
| 264 | check=True, |
| 265 | ) |
| 266 | github_output = os.environ.get("GITHUB_OUTPUT") |
| 267 | if github_output is not None: |
| 268 | with open(github_output, "a", encoding="utf-8") as wfh: |
| 269 | wfh.write("has-artifacts=false\n") |
| 270 | |
| 271 | |
| 272 | @docs.command( |