Check Links #23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check Links | |
on: | |
repository_dispatch: | |
workflow_dispatch: | |
schedule: | |
- cron: "00 12 * * *" | |
jobs: | |
linkChecker: | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write # required for peter-evans/create-issue-from-file | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Link Checker | |
id: lychee | |
uses: lycheeverse/lychee-action@1d97d84f0bc547f7b25f4c2170d87d810dc2fb2c | |
# We use --exclude '\.md(#.*)?$' to skip internal links in markdown like [See test](../tests/.../test_case.md) | |
# otherwise we get false positives due to links pointing to content that gets generated during our mkdocs flow. | |
# These links are checked during `mkdocs build --strict` | |
with: | |
args: > | |
README.md | |
src/**/*.py | |
src/**/*.md | |
tests/**/*.py | |
tests/**/*.md | |
docs/**/*.md | |
--exclude '\.md(#.*)?$' | |
fail: false | |
- name: Create Issue From File | |
if: steps.lychee.outputs.exit_code != 0 | |
uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd | |
with: | |
title: Link Checker Report | |
content-filepath: ./lychee/out.md | |
labels: report, automated issue |