Skip to content

phase 1: add Gemfile pinned to github-pages for reproducible local builds #13

phase 1: add Gemfile pinned to github-pages for reproducible local builds

phase 1: add Gemfile pinned to github-pages for reproducible local builds #13

Workflow file for this run

name: site-health
on:
pull_request:
paths:
- '*.html'
- '*.md'
- '_layouts/**'
- '_includes/**'
- '_config.yml'
- '_data/**'
- '_posts/**'
- 'images/**'
- 'css/**'
- 'js/**'
- 'Gemfile'
- 'Gemfile.lock'
- 'lychee.toml'
- '.html5validator.yaml'
schedule:
# Weekly Monday 9am UTC, matching update-publications cadence.
- cron: '0 9 * * 1'
workflow_dispatch:
jobs:
site-health:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
- name: Build site
run: bundle exec jekyll build
- name: Check links with lychee
id: lychee
uses: lycheeverse/lychee-action@v2
with:
# --exclude-path takes a regex matched against file paths.
# Skip legacy blog posts (deferred to a content-cleanup phase)
# and old top-level dated posts.
args: >-
--config ./lychee.toml
--no-progress
--root-dir ${{ github.workspace }}/_site
--exclude-path _site/blog
--exclude-path _site/2015
_site
output: lychee-report.md
fail: true
# On failure, post the lychee report as a sticky PR comment so
# the specific failing URLs are easy to see without digging
# through job logs. Sticky = updates in place rather than piling up.
- name: Comment lychee report on PR
if: failure() && github.event_name == 'pull_request'
uses: marocchino/sticky-pull-request-comment@v2
with:
header: lychee
path: lychee-report.md
- name: Validate HTML
uses: Cyb3r-Jak3/html5validator-action@v7.2.0
with:
root: _site/
config: .html5validator.yaml