Check Broken Links #10
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
name: Check Broken Links | |
on: | |
# repository_dispatch: | |
workflow_dispatch: | |
schedule: | |
- cron: "00 11 * * 2,5" # HKT 7PM Tuesday/Friday | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: site | |
# - name: Restore Lychee Cache | |
# uses: actions/cache@v3 | |
# with: | |
# path: .lycheecache | |
# key: cache-lychee-${{ github.sha }} | |
# restore-keys: cache-lychee- | |
# TODO: --include-fragments (v0.16?) | |
- name: Check Links | |
id: lychee | |
uses: lycheeverse/lychee-action@v1 | |
with: | |
# args: --base https://trebledj.me --user-agent 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' --timeout 60 --no-progress --accept '200,201,202,203,204,403,429' --include-verbatim --exclude-mail --exclude-path _site/404.html --cache --max-cache-age 3d _site | |
args: --base https://trebledj.me --user-agent 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' --timeout 60 --no-progress --accept '200,201,202,203,204,403,429' --include-verbatim --exclude-mail --exclude-path _site/404.html _site | |
- name: Create Issue From File | |
if: env.lychee_exit_code != 0 | |
uses: peter-evans/create-issue-from-file@v4 | |
with: | |
title: Link Checker Report | |
content-filepath: ./lychee/out.md | |
labels: report, automated issue |