2021-10-01 23:01:53 +03:00
|
|
|
# Checks for any broken links in the docs, and raises an issue if found
|
|
|
|
name: 🌈 Broken Link Checker
|
|
|
|
on:
|
|
|
|
repository_dispatch:
|
|
|
|
workflow_dispatch:
|
|
|
|
schedule:
|
2021-10-04 00:41:30 +03:00
|
|
|
- cron: '0 1 1 * *' # Run monthly
|
2021-10-01 23:01:53 +03:00
|
|
|
jobs:
|
|
|
|
link-checker:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2021-11-05 21:50:51 +03:00
|
|
|
- name: Load Excludes
|
|
|
|
run: |
|
|
|
|
LYCHEE_EXCLUDE=$(sed -e :a -e 'N;s/\n/ /;ta' .github/.lycheeexclude)
|
|
|
|
echo "LYCHEE_EXCLUDE=$LYCHEE_EXCLUDE" >> $GITHUB_ENV
|
|
|
|
|
2021-10-01 23:01:53 +03:00
|
|
|
- name: Check for Broken Links
|
|
|
|
uses: lycheeverse/lychee-action@v1.0.8
|
|
|
|
with:
|
2021-11-05 21:50:51 +03:00
|
|
|
args: --verbose -a 200,302,304,429 --exclude ${{ env.LYCHEE_EXCLUDE }} --exclude-mail --no-progress **/*.md
|
2021-10-01 23:01:53 +03:00
|
|
|
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:
|
2021-10-02 23:52:10 +03:00
|
|
|
token: ${{secrets.BOT_GITHUB_TOKEN}}
|
2021-10-01 23:01:53 +03:00
|
|
|
title: '[DOCS] Broken Links found in Documentation'
|
|
|
|
content-filepath: .github/broken-link-report.md
|
|
|
|
labels: '📕 Docs, 👩💻 Good First Issue, 💤 Low Priority, 🤖 Auto'
|