Skip to content

ci: add lychee link checking [beta] #9

ci: add lychee link checking [beta]

ci: add lychee link checking [beta] #9

Workflow file for this run

name: Check links
on:
pull_request:
jobs:
junit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: |
**/*.md
**/*.html
**/*.json
separator: " "
- name: Check links in changed files
id: lychee
if: steps.changed-files.outputs.any_changed == 'true'
uses: lycheeverse/lychee-action@v2
with:
fail: false
format: "json"
output: "results.json"
args: |
--verbose
${{ steps.changed-files.outputs.all_changed_files }}
- name: Create empty results if no files changed
if: steps.changed-files.outputs.any_changed == 'false'
run: echo '[]' > results.json
- name: Publish link check report
uses: mikepenz/action-junit-report@v6
with:
report_paths: "results.json"
annotate_only: true
fail_on_failure: true