-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (55 loc) · 2.13 KB
/
check-links.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
# 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: Check out the repositories and sites
run: |
for repo in contributing seismology seismology101 software website links; do
git clone --depth 1 --branch main https://github.com/seismo-learn/${repo} seismo-learn/${repo}/repo
done
for repo in contributing seismology seismology101 software links; do
git clone --depth 1 --branch gh-pages https://github.com/seismo-learn/${repo} seismo-learn/${repo}/site
done
git clone --depth 1 --branch main https://github.com/seismo-learn/seismo-learn.github.io seismo-learn/website/site
- name: Link Checker
uses: lycheeverse/[email protected]
with:
# 429: Too many requests
args: >
--accept 429
--scheme http
--scheme https
--scheme ftp
--exclude-all-private
--exclude "http://localhost"
--exclude "https://anaconda.org/"
--exclude "https://apt.repos.intel.com/oneapi"
--exclude "https://doi.org/*"
--exclude "https://fonts.gstatic.com"
--exclude "https://pkgs.org"
--exclude "https://theunarchiver.com/"
--exclude "https://www.fdsn.org/"
--exclude "https://www.fnet.bosai.go.jp"
--exclude "https://www.hinet.bosai.go.jp"
--exclude "https://www.scopus.com/home.uri"
--verbose
"seismo-learn/*/repo/README.md"
"seismo-learn/*/site/**/*.html"
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Create Issue From File
uses: peter-evans/create-issue-from-file@v5
if: github.event_name != 'pull_request'
with:
title: Link Checker Report on ${{ steps.date.outputs.date }}
content-filepath: ./lychee/out.md