Skip to content

Update link-check.yml #4

Update link-check.yml

Update link-check.yml #4

Workflow file for this run

name: Link Check
on:
push:
pull_request:
schedule:
- cron: "0 6 * * *" # every day at 06:00 UTC
workflow_dispatch:
permissions:
contents: write
jobs:
lychee:
name: Check links and update README
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Run lychee
uses: lycheeverse/[email protected]
with:
args: --config .lychee.toml --no-progress
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update Link Health section in README
run: |
node scripts/update-link-health.mjs
- name: Commit changes (if any)
run: |
if [[ -n "$(git status --porcelain)" ]]; then
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add README.md
git commit -m "chore: update Link Health section (automated)"
git push
else
echo "No README changes to commit."
fi