check links in markdown files #16
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
name: check links in markdown files | |
on: | |
repository_dispatch: | |
workflow_dispatch: | |
schedule: | |
- cron: "00 18 */7 * *" | |
jobs: | |
link-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get code, last 2 commits | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Get list of changed files | |
id: changed-files | |
run: | | |
echo "files=$(git diff --name-only --diff-filter=ACMRT HEAD~1 HEAD | tr '\n' ' ')" >> $GITHUB_ENV | |
- run: | | |
echo "${{ env.files }}" | |
- name: Run lychee link checker if any files changed | |
uses: lycheeverse/lychee-action@v1 | |
if: env.files != '' | |
with: | |
args: --verbose --exit 1 --exclude '(doi|genderit)\.org' ${{ env.files }} |