Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,52 @@ jobs:
npm ci --force
npm run lint
npm run build

- name: Run Lychee Link Checker
id: lychee
uses: lycheeverse/lychee-action@v2.8.0
with:
fail: false
args: >
--base-url https://docs.apify.com
--max-retries 6
--exclude="github.com"
--exclude="npmjs.com"
--no-progress
--timeout '60'
--accept '100..=103,200..=299,429'
--max-redirects 5
--format markdown
'./website/build/**/*.html'

- name: Find Comment
if: github.event_name == 'pull_request'
uses: peter-evans/find-comment@v3
id: find-comment
with:
issue-number: ${{ github.event.pull_request.number }}
body-includes: There are broken links in the documentation.

- name: Links are passing
if: github.event_path == 'pull_request' && steps.lychee.outputs.exit_code == 0 && steps.find-comment.outputs.comment-id
uses: peter-evans/create-or-update-comment@v5
with:
comment-id: ${{ steps.find-comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
✅ The link checker did not find any broken links.

See more at ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}#summary-${{ job.check_run_id }}
edit-mode: replace

- name: Links are failing
if: github.event_path == 'pull_request' && steps.lychee.outputs.exit_code != 0
uses: peter-evans/create-or-update-comment@v5
with:
comment-id: ${{ steps.find-comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
⚠️ There are broken links in the documentation.

See more at ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}#summary-${{ job.check_run_id }}
edit-mode: replace
Loading