Check Links #123
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
# This workflow checks the links in plaintext and HTML files | |
name: Check Links | |
on: | |
# Uncomment the 'pull_request' line below to trigger the workflow in PR | |
#pull_request: | |
# Schedule runs on 12 noon every Sunday | |
schedule: | |
- cron: '0 12 * * 0' | |
jobs: | |
check_links: | |
name: Check Links | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
with: | |
path: repository | |
- name: Checkout the website | |
uses: actions/checkout@v3 | |
with: | |
ref: gh-pages | |
path: website | |
- name: Link Checker | |
uses: lycheeverse/[email protected] | |
with: | |
# 429: Too many requests | |
args: > | |
--accept 429 | |
--exclude "http://localhost:1313/" | |
--exclude "^mailto:" | |
--exclude "^https://fonts.gstatic.com/" | |
--exclude "^https://www.sciencedirect.com/" | |
--exclude "file:///" | |
--verbose | |
"repository/**/*.md" | |
"website/**/*.html" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create Issue From File | |
uses: peter-evans/create-issue-from-file@v4 | |
with: | |
title: Link Checker Report | |
content-filepath: ./lychee/out.md |