-
Notifications
You must be signed in to change notification settings - Fork 171
77 lines (63 loc) · 2.09 KB
/
brokenlinks.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Checks for broken links
name: Broken Link Checker
on:
schedule:
- cron: 0 0 1 * * # run monthly
workflow_dispatch: # run manually
jobs:
repoLinkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Link Checker
id: lychee
uses: lycheeverse/[email protected]
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
# Check all markdown and html files in repo (default)
args: './**/*.md'
- name: Create Issue From File
if: steps.lychee.outputs.exit_code != 0
uses: peter-evans/[email protected]
with:
title: 'Bot: Broken Links Detected in Repo'
content-filepath: ./lychee/out.md
labels: automated issue
helperLinkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Playwright - Install w/ OS dependencies
run: |
cd helper
npx playwright install
npx playwright install-deps chromium
npm install -D @playwright/test
npm i -D playwright-expect
- name: Verifying Playwright install
run: |
cd helper
echo "Looking for playwright"
ls node_modules | grep playwright
echo "Playwright version"
npx playwright -V
- name: Playwright - Grab html
run: |
cd helper
npx playwright test --browser chromium .playwrighttests/helper-export-html-site.spec --reporter list
- name: Link Checker
id: lychee
uses: lycheeverse/[email protected]
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
args: "'prodsite.html' --format detailed --exclude './*.svg' './*.png' -n -v"
format: detailed
- name: Create Issue From File
if: steps.lychee.outputs.exit_code != 0
uses: peter-evans/[email protected]
with:
title: 'Bot: Broken Links Detected in AKSC Helper'
content-filepath: ./lychee/out.md
labels: automated issue