From 37568c3b3a201dd2aeb02f3be4acf549cf227d4b Mon Sep 17 00:00:00 2001 From: JuanPabloDiaz Date: Thu, 30 May 2024 21:39:40 -0400 Subject: [PATCH] chore: Add broken links report #2357 --- .github/workflows/broken-link-checker.yaml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/broken-link-checker.yaml b/.github/workflows/broken-link-checker.yaml index 6ec71137e..5a3f74c16 100644 --- a/.github/workflows/broken-link-checker.yaml +++ b/.github/workflows/broken-link-checker.yaml @@ -13,24 +13,30 @@ jobs: uses: actions/checkout@v4 - name: Check Links + id: lychee uses: lycheeverse/lychee-action@v1.10.0 with: args: --verbose --no-progress './**/*.md' './**/*.html' './**/*.json' --exclude-mail --exclude 'http://localhost:*/*' env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Create markdown file + run: | + echo "${{ steps.lychee.outputs.report }}" > broken_links_report.md + - name: Commit changes run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - git commit -m "Fix broken links" -a || echo "No changes to commit" + git add broken_links_report.md + git commit -m "Add broken links report" || echo "No changes to commit" shell: bash - name: Create Pull Request uses: peter-evans/create-pull-request@v3 with: token: ${{ secrets.GITHUB_TOKEN }} - commit-message: 'Fix broken links' - title: 'Fix broken links' - body: 'This PR fixes broken links found by the link checker.' - branch: 'fix/broken-links' + commit-message: 'Add broken links report' + title: 'Broken links report' + body: 'This PR adds a broken links report. See `broken_links_report.md` for details.' + branch: 'broken-links-report'