Skip to content

Commit

Permalink
Add link checker
Browse files Browse the repository at this point in the history
  • Loading branch information
senthil10 committed Oct 13, 2023
1 parent b204a55 commit 9c70146
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/htmltest-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CheckDoctype: false
CheckLinks: false
CheckMeta: false
CheckGeneric: false
CheckInternal: false
CheckInternalHash: false
CheckMailto: false
CheckTel: false
CheckMetaRefresh: false
IgnoreInternalEmptyHash: true
IgnoreEmptyHref: true
IgnoreAltMissing: true
IgnoreAltEmpty: true
IgnoreDirectoryMissingTrailingSlash: true
39 changes: 39 additions & 0 deletions .github/workflows/link-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Run htmltest to check for broken external links
# Scheduled for every first wednesday of the month

name: Check broken links (htmltest)
on:
workflow_dispatch:
branches:
- develop
schedule:
- cron: '20 8 1-7 * 3'

jobs:
htmltest:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3

- name: Set up Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "latest"

- name: Run Hugo
run: hugo -d dist

- name: Test HTML
continue-on-error: true
uses: wjdp/htmltest-action@master
with:
path: dist
config: .github/htmltest-config.yml

- name: Archive htmltest results
uses: actions/upload-artifact@v3
with:
name: htmltest-report
path: tmp/.htmltest/htmltest.log
retention-days: 7

0 comments on commit 9c70146

Please sign in to comment.