Skip to content

Merge branch 'main' into ndom91/sc-00/broken-link-checker #24

Merge branch 'main' into ndom91/sc-00/broken-link-checker

Merge branch 'main' into ndom91/sc-00/broken-link-checker #24

name: Vercel Preview URL Broken Link Checker
on: push
jobs:
check_broken_links:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: vercel-preview-url
uses: zentered/[email protected]
id: vercel_preview_url
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
with:
vercel_project_id: 'QmSNiK5bcLmLnTeioXKfdE5uxVZ4Kh3nE7u6QLFKEfebM6'
vercel_team_id: 'team_AXvrWtvu32E0pksIZqnGmc78'
- name: DEBUG - Get URL
run: echo "https://${{ steps.vercel_preview_url.outputs.preview_url }}"
- name: Wait for Vercel Build
run: |
if [ "${{ steps.vercel_preview_url.outputs.deployment_state }}" != "READY" ]; then
sleep 180
fi
- uses: actions/checkout@v3
- name: Check for broken links
id: link-report
uses: './.github/link-checker'
continue-on-error: true
with:
url: "https://${{ steps.vercel_preview_url.outputs.preview_url }}/docs"
honorRobotExclusions: false
ignorePatterns: "now.sh,acme.com,nodejs.org,pptr.dev,placehold.co,herokuapp.com,github,google,vercel.com,checklyhq.com,stripe.com,playwright.dev,visualstudio.com,npmjs.com,twitter.com,aka.ms,cloudflare.com,terraform.io"
recursiveLinks: true
- name: DEBUG - Get the result
run: echo "${{steps.link-report.outputs.result}}"
- uses: jwalton/gh-find-current-pr@v1
id: finder
- name: Add comment to PR
id: comment_to_pr
continue-on-error: true
uses: marocchino/sticky-pull-request-comment@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
number: ${{ steps.finder.outputs.pr }}
header: Broken Links
message: |
${{steps.link-report.outputs.result}}