Skip to content

Commit

Permalink
Run mdbook-linkcheck to check links in the book (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
sourcefrog authored Jan 7, 2024
2 parents 18c9a35 + cb7b89d commit f281f9d
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: "book/book"
path: "book/book/html"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
22 changes: 22 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,25 @@ jobs:
with:
name: mutants.out
path: mutants.out

book:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: beta
- uses: Swatinem/rust-cache@v2
- name: Install mdbook and mdbook-linkcheck
uses: taiki-e/install-action@v2
with:
tool: mdbook, mdbook-linkcheck
- name: Build mdbook
run: |
mdbook build book
- name: Archive book output
uses: actions/upload-artifact@v3
if: always()
with:
name: book
path: book/book
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ mutants.out
mutants.out.old
.cargo/config.toml
wiki
.vscode/
8 changes: 8 additions & 0 deletions book/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@ language = "en"
multilingual = false
src = "src"
title = "cargo-mutants"

[output.html]

[output.linkcheck]
follow-web-links = true

[output.linkcheck.http-headers]
'crates\.io' = ["Accept: text/html"]
3 changes: 0 additions & 3 deletions book/src/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,3 @@ jobs:
name: mutants-out
path: mutants.out
```
The workflow used by cargo-mutants on itself can be seen at
<https://github.com/sourcefrog/cargo-mutants/blob/main/.github/workflows/mutate-self.yaml>, but this is different from what you will typically want to use, because it runs cargo-mutants from HEAD.

0 comments on commit f281f9d

Please sign in to comment.