Skip to content

Commit

Permalink
doc: fix mdbook
Browse files Browse the repository at this point in the history
- cached linkcheck
- disabled follow-web-links for actions
  • Loading branch information
rsteube committed Dec 15, 2024
1 parent e162aa1 commit 45d2819
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,27 @@ 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
sed -i 's/^follow-web-links.*/follow-web-links = false/' 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 [email protected]
Expand Down
2 changes: 1 addition & 1 deletion docs/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ enable = true

[output.linkcheck]
follow-web-links = true
exclude = [ 'archlinux\.org', 'specifications\.freedesktop\.org' ]
exclude = [ 'archlinux\.org']

0 comments on commit 45d2819

Please sign in to comment.