diff --git a/.github/workflows/MonthlyLinkCheck.yml b/.github/workflows/MonthlyLinkCheck.yml index aaddcda926..fb9283862a 100644 --- a/.github/workflows/MonthlyLinkCheck.yml +++ b/.github/workflows/MonthlyLinkCheck.yml @@ -22,10 +22,21 @@ jobs: id: lychee uses: lycheeverse/lychee-action@v2 with: - args: --accept=200,403,429 --base . --verbose --no-progress './**/*.md' './**/*.html' './**/*.rst' + args: --accept=200,202,403,429 --base $GITHUB_WORKSPACE --no-progress './**/*.md' './**/*.html' './**/*.rst' token: ${{ secrets.CUSTOM_TOKEN }} + jobSummary: false # Disable default summary fail: true - + - name: Create Filtered Summary + if: always() + run: | + if [ -f ./lychee/out.md ]; then + echo "## Link Check Results (Errors Only)" >> $GITHUB_STEP_SUMMARY + # Extract only error sections, skip redirects + grep -A 10000 "^## Errors per input" ./lychee/out.md | \ + grep -B 10000 "^## Redirects per input" | \ + head -n -1 >> $GITHUB_STEP_SUMMARY || \ + grep -A 10000 "^## Errors per input" ./lychee/out.md >> $GITHUB_STEP_SUMMARY + fi - name: Create Issue From File if: failure() && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') uses: peter-evans/create-issue-from-file@v5