Skip to content

Automatic broken link checking #1

Automatic broken link checking

Automatic broken link checking #1

Workflow file for this run

name: Link Checker
on:
repository_dispatch:
workflow_dispatch:
schedule:
- cron: "00 18 * * *"
jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
bundler-cache: true
cache-version: 0
- name: Install dependencies
run: |
bundle install
- name: Build with Jekyll
# Outputs to the './_site' directory by default
run: |
bundle exec jekyll build
env:
PAGES_REPO_NWO: ${{ github.repository }}
JEKYLL_BUILD_BRANCH: ${{ github.ref_name }}
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action
with:
# Check all markdown, html and reStructuredText files in repo (default)
args: _site/ --fallback-extensions .html
# Don't fail action on broken links
fail: false
# Lychee version
lycheeVersion: 0.16.1
# Create or Update the issue based on the link check result
- name: Update Comment From File
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: 2531398005
body-path: ./lychee/out.md