-
Notifications
You must be signed in to change notification settings - Fork 14
41 lines (35 loc) · 1.16 KB
/
linkcheck.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
name: Check for broken links
on:
repository_dispatch:
workflow_dispatch:
schedule:
# https://crontab.guru/#00_18_*_*_1
- cron: "00 18 * * 1"
permissions:
issues: write
jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
# This should be the same version that we use in .netlify.toml
hugo-version: '0.125.3'
extended: true
- name: Build
run: hugo --minify
- name: Link Checker
uses: lycheeverse/[email protected]
with:
args: --exclude https://fonts.gstatic.com --exclude twitter.com --exclude https://data8.org --verbose --no-progress public/**/*.html # fonts.gstatic.com is an expected fail and twitter returns "too many requests" errors
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- 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