mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-30 15:34:33 +01:00
CI: Switch to lychee for linkchecking
This commit is contained in:
parent
26d5909345
commit
115fc3e212
1 changed files with 16 additions and 43 deletions
59
.github/workflows/build.yml
vendored
59
.github/workflows/build.yml
vendored
|
@ -320,32 +320,14 @@ jobs:
|
||||||
|
|
||||||
# Build documentation, check links
|
# Build documentation, check links
|
||||||
docs:
|
docs:
|
||||||
name: Cargo docs, check links
|
name: Build docs
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Cache pip installed linkchecker
|
- name: Install lychee
|
||||||
uses: actions/cache@v3
|
run: cargo install lychee
|
||||||
with:
|
|
||||||
path: ~/.cache/pip
|
|
||||||
key: ${{ runner.os }}-pip
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pip-
|
|
||||||
|
|
||||||
- name: Set up Python 3.x
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
# Semantic version range syntax or exact version of a Python version
|
|
||||||
python-version: '3.x'
|
|
||||||
|
|
||||||
# You can test your matrix by printing the current Python version
|
|
||||||
- name: Display Python version
|
|
||||||
run: python -c "import sys; print(sys.version)"
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pip install git+https://github.com/linkchecker/linkchecker.git
|
|
||||||
|
|
||||||
- name: Remove cargo-config
|
- name: Remove cargo-config
|
||||||
run: rm -f .cargo/config
|
run: rm -f .cargo/config
|
||||||
|
@ -358,34 +340,25 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
td=$(mktemp -d)
|
td=$(mktemp -d)
|
||||||
cp -r target/doc $td/api
|
cp -r target/doc $td/api
|
||||||
linkchecker $td/api/rtic/
|
lychee --offline $td/api/rtic/
|
||||||
linkchecker $td/api/rtic_macros/
|
lychee --offline $td/api/rtic_macros/
|
||||||
linkchecker $td/api/rtic_arbiter/
|
lychee --offline $td/api/rtic_arbiter/
|
||||||
linkchecker $td/api/rtic_channel/
|
lychee --offline $td/api/rtic_channel/
|
||||||
linkchecker $td/api/rtic_common/
|
lychee --offline $td/api/rtic_common/
|
||||||
linkchecker $td/api/rtic_macros/
|
lychee --offline $td/api/rtic_macros/
|
||||||
linkchecker $td/api/rtic_monotonics/
|
lychee --offline $td/api/rtic_monotonics/
|
||||||
linkchecker $td/api/rtic_time/
|
lychee --offline $td/api/rtic_time/
|
||||||
|
|
||||||
# Build the books
|
# Build the books
|
||||||
mdbook:
|
mdbook:
|
||||||
name: mdbook, check links
|
name: build mdbook
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Set up Python 3.x
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
# Semantic version range syntax or exact version of a Python version
|
|
||||||
python-version: '3.x'
|
|
||||||
|
|
||||||
# You can test your matrix by printing the current Python version
|
- name: Install lychee
|
||||||
- name: Display Python version
|
run: cargo install lychee
|
||||||
run: python -c "import sys; print(sys.version)"
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pip install git+https://github.com/linkchecker/linkchecker.git
|
|
||||||
|
|
||||||
- name: Install mdbook-mermaid
|
- name: Install mdbook-mermaid
|
||||||
run: cargo install mdbook-mermaid
|
run: cargo install mdbook-mermaid
|
||||||
|
@ -412,8 +385,8 @@ jobs:
|
||||||
cp LICENSE-* $td/book/en
|
cp LICENSE-* $td/book/en
|
||||||
cp LICENSE-* $td/book/ru
|
cp LICENSE-* $td/book/ru
|
||||||
|
|
||||||
linkchecker $td/book/en/
|
lychee --offline $td/book/en/
|
||||||
linkchecker $td/book/ru/
|
lychee --offline $td/book/ru/
|
||||||
|
|
||||||
# # Update stable branch
|
# # Update stable branch
|
||||||
# #
|
# #
|
||||||
|
|
Loading…
Reference in a new issue