2022-01-20 09:14:23 +00:00
|
|
|
name: linkcheck
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- unstable
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- 'book/**'
|
2023-05-02 01:59:51 +00:00
|
|
|
merge_group:
|
2022-01-20 09:14:23 +00:00
|
|
|
|
2023-08-14 03:16:03 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2022-01-20 09:14:23 +00:00
|
|
|
jobs:
|
|
|
|
linkcheck:
|
|
|
|
name: Check broken links
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2024-03-07 12:32:24 +00:00
|
|
|
uses: actions/checkout@v4
|
2022-01-20 09:14:23 +00:00
|
|
|
|
|
|
|
- name: Run mdbook server
|
2023-12-04 23:32:10 +00:00
|
|
|
run: |
|
|
|
|
docker run -v ${{ github.workspace }}/book:/book --name book -p 3000:3000 -d peaceiris/mdbook:latest serve --hostname 0.0.0.0
|
|
|
|
sleep 5
|
2022-01-20 09:14:23 +00:00
|
|
|
|
|
|
|
- name: Print logs
|
|
|
|
run: docker logs book
|
|
|
|
|
|
|
|
- name: Run linkcheck
|
2023-12-04 23:32:10 +00:00
|
|
|
run: |
|
|
|
|
curl -sL https://github.com/filiph/linkcheck/releases/download/3.0.0/linkcheck-3.0.0-linux-x64.tar.gz | tar xvzf - linkcheck/linkcheck --strip 1
|
|
|
|
./linkcheck localhost:3000 -d
|