diff --git a/.github/workflows/link-check-on-pr.yml b/.github/workflows/link-check-on-pr.yml index 0ee535e828..9d9985efe5 100644 --- a/.github/workflows/link-check-on-pr.yml +++ b/.github/workflows/link-check-on-pr.yml @@ -36,7 +36,6 @@ jobs: token: ${{ secrets.DOCS_BOT_PAT_READPUBLICKEY }} - name: Link check all pages (internal links only) - id: all_links env: LEVEL: 'critical' ACTION_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} @@ -52,12 +51,8 @@ jobs: run: node src/links/scripts/rendered-content-link-checker.js - name: Upload artifact(s) + if: ${{ always() }} uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 with: name: artifacts path: ./artifacts - - - name: Fail if either check has broken links in its level - if: ${{ steps.changed_links.outputs.has_flaws_at_level == 'true' || steps.all_links.outputs.has_flaws_at_level == 'true' }} - run: | - exit 1 diff --git a/src/links/scripts/rendered-content-link-checker.js b/src/links/scripts/rendered-content-link-checker.js index 281c81ead9..98d48f3ca5 100755 --- a/src/links/scripts/rendered-content-link-checker.js +++ b/src/links/scripts/rendered-content-link-checker.js @@ -332,6 +332,7 @@ async function main(core, octokit, uploadArtifact, opts = {}) { ) } } + process.exit(1) } else { // It might be that the PR got a comment about >0 flaws before, // and now it can update that comment to say all is well again.