Skip to content

Commit 6f0d35c

Browse files
committed
Fix: htmlproofer test
Fix: install gems locally Fix: install gems locally Fix: install gems locally Fix: another try
1 parent 2b6cde4 commit 6f0d35c

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

.github/workflows/build-site.yml

+13-11
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,18 @@ jobs:
2828
build_only: true
2929
build_dir: _site
3030

31-
- name: all dirs
31+
- name: Run HTMLProofer with Ruby script that skips new links
3232
run: |
33-
ls
34-
pwd
33+
merge_base = `git merge-base origin/main HEAD`.chomp
34+
diffable_files = `git diff --name-only --diff-filter=AC #{merge_base}`.split("\n")
35+
diffable_files = diffable_files.select { |filename| filename.end_with?('.md') }.map { |f| File.basename(f, File.extname(f)) }
36+
HTMLProofer.check_directory('./_site', { ignore_urls: diffable_files }).run
3537
36-
- name: Check HTML using htmlproofer
37-
uses: chabad360/htmlproofer@master
38-
with:
39-
directory: "_site"
40-
arguments: |
41-
--ignore-urls "https://fonts.googleapis.com,https://fonts.gstatic.com,_site/_posts/README/index.html"
42-
--ignore-files "/.+\/_posts\/README.md"
43-
--ignore-status-codes "0,403, 429, 503, 999"
38+
# - name: Check HTML using htmlproofer
39+
# uses: chabad360/htmlproofer@master
40+
# with:
41+
# directory: "_site"
42+
# arguments: |
43+
# --ignore-urls "https://fonts.googleapis.com,https://fonts.gstatic.com,_site/_posts/README/index.html"
44+
# --ignore-files "/.+\/_posts\/README.md"
45+
# --ignore-status-codes "0,403, 429, 503, 999"

Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ source "https://rubygems.org"
33
gem "github-pages", group: :jekyll_plugins
44
gem "jekyll-include-cache"
55
gem "webrick"
6+
gem "html-proofer"

0 commit comments

Comments
 (0)