Skip to content
Merged
Show file tree
Hide file tree
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
50 changes: 50 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,53 @@ jobs:
cd website
pnpm lint
pnpm 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"
--exclude="docs\.apify\.com/api/client/js/assets/"
--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_name == '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_name == '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
2 changes: 1 addition & 1 deletion website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ module.exports = {
rehypePlugins: [externalLinkProcessor],
editUrl: 'https://github.com/apify/apify-client-js/edit/master/website/',
},
blog: false,
}),
],
]),
Expand Down Expand Up @@ -120,7 +121,6 @@ module.exports = {
content: {
includeVersionedDocs: false,
enableLlmsFullTxt: true,
includeBlog: true,
includeGeneratedIndex: false,
includePages: true,
relativePaths: false,
Expand Down
Loading