Broken Link Checker #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |