diff --git a/.github/workflows/link_checker_workflow.yaml b/.github/workflows/link_checker_workflow.yaml index 8969a255245..1e2b4416ade 100644 --- a/.github/workflows/link_checker_workflow.yaml +++ b/.github/workflows/link_checker_workflow.yaml @@ -90,20 +90,19 @@ jobs: comment-author: 'github-actions[bot]' body-includes: "## Link Resolution Note" - # - name: Delete comment on success - # if: steps.lychee-check.outcome == 'success' && steps.find-comment.outputs.comment-id != '' - # uses: detomarco/delete-comment@v1 - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # repository: ${{ github.repository }} - # comment-id: ${{ steps.find-comment.outputs.comment-id }} + - name: Delete comment on success + if: steps.lychee-check.outcome == 'success' && steps.find-comment.outputs.comment-id != '' + uses: detomarco/delete-comment@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + repository: ${{ github.repository }} + comment-id: ${{ steps.find-comment.outputs.comment-id }} - name: Prepare Report if: env.HAS_CHANGES == 'true' && steps.lychee-check.outcome == 'failure' run: | - # Create a new file 'full-report.md' echo "## Link Resolution Note" > full-report.md - + echo "" >> full-report.md echo "Local links and directory changes work differently on GitHub than on the docsite." >> full-report.md echo "You must ensure fixes pass the **GitHub check** and also work with **\`hugo server\`**." >> full-report.md @@ -111,12 +110,13 @@ jobs: echo "" >> full-report.md echo "---" >> full-report.md + echo "### Broken Links Found" >> full-report.md echo "" >> full-report.md + echo "" >> full-report.md sed -E '/(Redirect|Redirects per input)/d' lychee-report.md >> full-report.md echo "" >> full-report.md - - name: Create PR Comment if: env.HAS_CHANGES == 'true' && steps.lychee-check.outcome == 'failure'