π Broken Link Checker #22
This file contains 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
# Checks for any broken links in the docs, and raises an issue if found | |
name: π Broken Link Checker | |
on: | |
repository_dispatch: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 1 1 * *' # Run monthly | |
jobs: | |
link-checker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Load Excludes | |
run: | | |
LYCHEE_EXCLUDE=$(sed -e :a -e 'N;s/\n/ /;ta' .github/.lycheeexclude) | |
echo "LYCHEE_EXCLUDE=$LYCHEE_EXCLUDE" >> $GITHUB_ENV | |
- name: Check for Broken Links | |
uses: lycheeverse/[email protected] | |
with: | |
args: --verbose -a 200,302,304,429 --exclude ${{ env.LYCHEE_EXCLUDE }} --exclude-mail --no-progress **/*.md | |
env: | |
GITHUB_TOKEN: ${{secrets.BOT_GITHUB_TOKEN}} | |
LYCHEE_OUT: .github/broken-link-report.md | |
- name: Raise an Issue with Results | |
uses: peter-evans/create-issue-from-file@v3 | |
with: | |
token: ${{secrets.BOT_GITHUB_TOKEN}} | |
title: '[DOCS] Broken Links found in Documentation' | |
content-filepath: .github/broken-link-report.md | |
labels: 'π Docs, π©βπ» Good First Issue, π€ Low Priority, π€ Auto' |