From 27f17ae7e6375eb88c3eede7ed30e2e96468c9eb Mon Sep 17 00:00:00 2001 From: Michael Harp Date: Fri, 1 May 2026 06:39:28 -0400 Subject: [PATCH] Add htmlproofer CI workflow (advisory) Adds htmlproofer to the CI pipeline to catch broken internal links on every PR and push to master. Runs in advisory mode (continue-on-error: true) due to inherited link debt from the Puppet docs migration. - Internal links only (--disable-external) to avoid third-party flakiness - Ignores legacy /puppet/, /pe/, /puppetlabs/ URL prefixes - Pinned to ubuntu-24.04 and actions/checkout@v4 to match test.yml Signed-off-by: Michael Harp Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/htmlproofer.yml | 31 +++++++++++++++++++++++++++++++ Gemfile | 1 + 2 files changed, 32 insertions(+) create mode 100644 .github/workflows/htmlproofer.yml diff --git a/.github/workflows/htmlproofer.yml b/.github/workflows/htmlproofer.yml new file mode 100644 index 000000000..92b09554d --- /dev/null +++ b/.github/workflows/htmlproofer.yml @@ -0,0 +1,31 @@ +--- +name: HTML Proofer + +on: + pull_request: {} + push: + branches: + - master + workflow_dispatch: {} + +permissions: + contents: read + +jobs: + html-proofer: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3' + bundler-cache: true + - name: Build site + run: bundle exec jekyll build + - name: Check links (advisory — failures reported but do not block) + continue-on-error: true + run: | + bundle exec htmlproofer _site \ + --disable-external \ + --ignore-urls "/puppet/,/pe/,/puppetlabs/" \ + --allow-hash-href diff --git a/Gemfile b/Gemfile index f66e99ef8..e0cf2d810 100644 --- a/Gemfile +++ b/Gemfile @@ -10,6 +10,7 @@ gem 'rake', '~> 13.0', '>= 13.0.1' gem 'versionomy', '~> 0.5.0' group(:build_site) do + gem 'html-proofer', '~> 5.0' gem 'jekyll', '~> 4.4' gem 'jekyll-vitepress-theme', '~> 1.4' end