Skip to content

Check Links

Check Links #189

Workflow file for this run

# 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@v4
with:
path: repository
- name: Checkout the website
uses: actions/checkout@v4
with:
ref: gh-pages
path: documentation
- name: Link Checker
uses: lycheeverse/[email protected]
with:
# 429: Too many requests
args: >
--accept 429
--exclude-all-private
--exclude "^mailto:"
--exclude "^https://www.bilibili.com/"
--exclude "^https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$"
--exclude "^https://download1.rpmfusion.org/free/el/rpmfusion-free-release-$"
--exclude "^https://doi.org/"
--exclude "^https://www.researchgate.net/"
--exclude "^file:///"
--exclude "^https://github.com/gmt-china/GMT_docs/edit/"
--verbose
"repository/*.md"
"documentation/latest/**/*.html"
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Create Issue From File
uses: peter-evans/create-issue-from-file@v5
with:
title: Link Checker Report on ${{ steps.date.outputs.date }}
content-filepath: ./lychee/out.md