Skip to content

Link check (weekly) #122

Link check (weekly)

Link check (weekly) #122

Workflow file for this run

name: Link check (weekly)
on:
repository_dispatch:
workflow_dispatch:
schedule:
- cron: "10 02 * * 6"
jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Fetch main
run: |
git fetch origin main --depth 1
git branch
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "24"
cache: npm
- name: Install npm dependencies
run: npm ci
- name: Setup Hugo
uses: peaceiris/actions-hugo@2752ce1d29631191ea3f27c23495fa06139a5b78 # v3
with:
hugo-version: "0.139.4"
extended: true
- name: Build with Hugo
run: hugo --gc --minify
env:
HUGO_ENV: production
- name: Restore lychee cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: .lycheecache
key: cache-lychee-${{ hashFiles('lychee.toml', '.lycheeignore') }}-${{ github.sha }}
restore-keys: |
cache-lychee-${{ hashFiles('lychee.toml', '.lycheeignore') }}-
cache-lychee-
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2.8.0
with:
args: >
--root-dir public
public
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Issue From File
if: env.lychee_exit_code != 0
uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710 # v6.0.0
with:
title: Link Checker Report
content-filepath: ./lychee/out.md
labels: report, automated issue