-
Notifications
You must be signed in to change notification settings - Fork 36
45 lines (43 loc) · 1.54 KB
/
broken-link-checker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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
- name: Check for broken links
id: link-report
uses: celinekurpershoek/[email protected]
with:
url: "https://${{ steps.vercel_preview_url.outputs.preview_url }}/docs"
honorRobotExclusions: false
ignorePatterns: "github,google"
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
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}}