Skip to content

Commit

Permalink
Add GitHub workflow to check internal links
Browse files Browse the repository at this point in the history
  • Loading branch information
bebatut committed Dec 4, 2024
1 parent a28411e commit 7860a89
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
File renamed without changes.
40 changes: 40 additions & 0 deletions .github/workflows/lint_jekyll.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Lint Jekyll site

on: [push, pull_request]

jobs:
check-internal-links:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- uses: actions/checkout@v3
- uses: ruby/[email protected]
with:
ruby-version: '3.3'
bundler-cache: true
cache-version: 0
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Install dependencies
run: |
bundle install
- 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: Validate HTML and check links
run: |
bundle exec htmlproofer \
--allow_missing_href=true \
--ignore-urls "/.*localhost.*/","/.*gitter\.im.*/" \
--enforce-https=false \
--disable-external=true \
--ignore_empty_alt=true \
--ignore_missing_alt=true \
--check-internal-hash=false \
./_site

0 comments on commit 7860a89

Please sign in to comment.