From 42c7c0c22b8b5da8b75241badb1644ccde521efb Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sat, 28 Jan 2023 01:46:05 +0900 Subject: [PATCH] Use ephemeral PAT for linkcheck Signed-off-by: Yuki Okushi --- .github/workflows/ci.yml | 1 + book.toml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a21e342cb..64155ddd7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,7 @@ jobs: MDBOOK_TOC_VERSION: 0.9.0 DEPLOY_DIR: book/html BASE_SHA: ${{ github.event.pull_request.base.sha }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v3 with: diff --git a/book.toml b/book.toml index dc216760e..747567461 100644 --- a/book.toml +++ b/book.toml @@ -40,6 +40,9 @@ exclude = [ cache-timeout = 86400 warning-policy = "error" +[output.linkcheck.http-headers] +'github\.com' = ["Accept: application/vnd.github+json", "Authorization: Bearer $GITHUB_TOKEN"] + [output.html.redirect] "/compiletest.html" = "tests/compiletest.html" "/diagnostics/sessiondiagnostic.html" = "diagnostics/diagnostic-structs.html"