Skip to content

Add broken link checker on PR #15

Add broken link checker on PR

Add broken link checker on PR #15

Workflow file for this run

name: Check broken links (PR build)
on:
pull_request:
jobs:
# Build job
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0
with:
ruby-version: '3.1' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # Increment this number if you need to re-download cached gems
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: Build with Jekyll
# Outputs to the './_site' directory by default
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production
- name: Check for broken links
uses: athackst/htmlproofer-action@main
with:
directory: '_site'
check_images: false
check_scripts: false
check_opengraph: false
# External behavior
ignore_status_codes: '403,429,500,502,503,504'
# Silence noise
validate: false
check_internal_hash: false
check_external_hash: false
ignore_missing_alt: true
ignore_empty_alt: true
allow_missing_href: true
# Ignore HTTP + protocol-relative URLs
ignore_urls: '^http://,^//'