Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Check Links

on:
pull_request:
branches:
- main

# commenting needs these
permissions:
pull-requests: write


jobs:
lychee:
strategy:
matrix:
tags: ["0.1.0", "0.2.0", "0.2.1", "0.3.0"]

runs-on: ubuntu-latest

steps:
- name: Check out repository code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false

- name: Link Checker in the book
uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2
with:
args: --root-dir tags/${{ matrix.tags }}/book --require-https --no-progress --include-fragments --include-verbatim tags/${{ matrix.tags }}/book
fail: false

- name: Format summary for comment
run: |
echo "# Summary ${{ matrix.tags }}" > summary-comment.md
# Only keep the # Summary header and the table by deleting every thing after a ## Then add the matrix info to the heading
sed '/^##\s/,/$EOF/{d}' lychee/out.md | sed 's/^# Summary/## Book/g' >> summary-comment.md

- name: Link Checker in the api docs
uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2
with:
args: --root-dir tags/${{ matrix.tags }}/api --require-https --no-progress --include-fragments --include-verbatim tags/${{ matrix.tags }}/api
fail: false

- name: Format summary for comment
run: |
# Only keep the # Summary header and the table by deleting every thing after a ## then
sed '/^##\s/,/$EOF/{d}' lychee/out.md | sed 's/^# Summary/## Api docs/g' >> summary-comment.md

- name: Comment Summary on PR
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2
with:
header: ${{ matrix.tags }}
path: summary-comment.md
Loading