Add Links Validator workflow #45

This commit is contained in:
Marius Stanca 2023-01-03 12:43:11 +02:00
parent 6acadc7a23
commit a3d1e38c91
No known key found for this signature in database
GPG Key ID: 3F18F3CF10AD6E8D
2 changed files with 33 additions and 0 deletions

32
.github/workflows/links-validator.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: Links validator
on:
schedule:
# At 09:00 on Monday: https://crontab.guru/#0_9_*_*_1
- cron: "0 9 * * 1"
jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check links
uses: lycheeverse/lychee-action@v1.5.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: --verbose --no-progress --timeout 10 --max-concurrency 2 --exclude 'twitter.com' -- './**/*.md'
output: ./lychee/out.md
- name: Get current date
id: date
run: echo "::set-output name=now::$(date +'%d-%m-%Y')"
- name: Create issue when fail
if: ${{ steps.lychee.outputs.exit_code }} != 0
uses: peter-evans/create-issue-from-file@v4
with:
title: Automated Links Checker Report for ${{ steps.date.outputs.now }}
content-filepath: ./lychee/out.md
labels: links validator

View File

@ -29,6 +29,7 @@ theme:
- search.highlight - search.highlight
- navigation.indexes - navigation.indexes
- code.action.view - code.action.view
- navigation.footer
# Extra # Extra
extra: extra: