Skip to content

Commit

Permalink
try improvement to lychee action
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Hardman <[email protected]>
  • Loading branch information
dhh1128 committed Aug 21, 2024
1 parent 2f4e225 commit 887f251
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions .github/workflows/link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,15 @@ name: check links in markdown files
on:
repository_dispatch:
workflow_dispatch:
schedule:
- cron: "00 18 */7 * *"

push:

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 }}"
- uses: actions/checkout@v3

- name: Run lychee link checker if any files changed
- name: Run lychee link checker
uses: lycheeverse/lychee-action@v1
if: env.files != ''
with:
args: --verbose --exit-status --exclude '(doi|genderit)\.org' *.md

0 comments on commit 887f251

Please sign in to comment.