From 347c92e26051cc03bae5177351544ff16cdcfed6 Mon Sep 17 00:00:00 2001 From: rsteube Date: Sun, 15 Dec 2024 14:32:14 +0100 Subject: [PATCH] doc: cache linkcheck --- .github/workflows/go.yml | 12 ++++++++---- docs/book.toml | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 81ca662c6..d1dc13e86 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -71,22 +71,26 @@ jobs: name: carapace path: ./cmd/carapace + - name: Cache linkcheck + uses: actions/cache@v3 + with: + path: ./docs/book/linkcheck/cache.json + - name: "build docs" run: | chmod +x cmd/carapace/carapace - sed -i 's/\[output.linkcheck\]/#[output.linkcheck]/' docs/book.toml sh .github/completers.sh > docs/src/completers.md sh .github/conditions.sh > docs/src/variable/conditions.md sh .github/macros.sh > docs/src/spec/macros.md mdbook build docs - sh .github/badge.sh > docs/book/badge.svg - sh .github/macros-badge.sh > docs/book/macros-badge.svg + sh .github/badge.sh > docs/book/html/badge.svg + sh .github/macros-badge.sh > docs/book/html/macros-badge.svg sh docs/postprocessor/opengraph.sh - name: "push gh-pages" if: github.ref == 'refs/heads/master' run: | - cd docs/book/ + cd docs/book/html/ git init git config user.name rsteube git config user.email rsteube@users.noreply.github.com diff --git a/docs/book.toml b/docs/book.toml index a0288f085..9cfea4e1f 100644 --- a/docs/book.toml +++ b/docs/book.toml @@ -19,4 +19,4 @@ enable = true [output.linkcheck] follow-web-links = true -exclude = [ 'archlinux\.org', 'specifications\.freedesktop\.org' ] +exclude = [ 'archlinux\.org', 'specifications\.freedesktop\.org', 'pkg\.go\.dev', 'linux\.die\.net']