Skip to content

Commit 6419c69

Browse files
committed
feat: Enhance link checking with comprehensive coverage
- Added build-time link checker to catch internal documentation link issues early - Enhanced post-deployment checker to verify all documentation pages - Check all docs pages: installation, usage, api-endpoints, document-templates, error-handling, examples, image-support, integration - Upload separate artifacts for build-time and deployment link checks - Improved summary reporting with both check results - Fail gracefully to avoid blocking deployments while providing visibility Benefits: - Catch broken internal links before deployment - Comprehensive coverage of all documentation pages - Better debugging with detailed reports - Early detection of documentation issues
1 parent b2617cc commit 6419c69

File tree

1 file changed

+47
-11
lines changed

1 file changed

+47
-11
lines changed

.github/workflows/pages.yml

Lines changed: 47 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,24 @@ jobs:
4646
env:
4747
JEKYLL_ENV: production
4848

49+
- name: Check internal links in built site
50+
uses: lycheeverse/lychee-action@v2
51+
with:
52+
args: --config .lycheerc.toml --verbose --no-progress --accept 200,301,302,403,429 --base _site _site/
53+
fail: false
54+
format: markdown
55+
output: build-time-link-check.md
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
59+
- name: Upload build-time link check report
60+
if: always()
61+
uses: actions/upload-artifact@v4
62+
with:
63+
name: build-time-link-check
64+
path: build-time-link-check.md
65+
retention-days: 7
66+
4967
- name: Upload artifact
5068
uses: actions/upload-pages-artifact@v3
5169

@@ -71,30 +89,48 @@ jobs:
7189
- name: Wait for deployment
7290
run: sleep 30
7391

74-
- name: Check links with Lychee
92+
- name: Check all documentation links
7593
uses: lycheeverse/lychee-action@v2
7694
with:
77-
args: --config .lycheerc.toml --verbose --no-progress https://etherisc-services.github.io/document-templating-service/
95+
args: |
96+
--config .lycheerc.toml --verbose --no-progress
97+
https://etherisc-services.github.io/document-templating-service/
98+
https://etherisc-services.github.io/document-templating-service/docs/
99+
https://etherisc-services.github.io/document-templating-service/docs/installation.html
100+
https://etherisc-services.github.io/document-templating-service/docs/usage.html
101+
https://etherisc-services.github.io/document-templating-service/docs/api-endpoints.html
102+
https://etherisc-services.github.io/document-templating-service/docs/document-templates.html
103+
https://etherisc-services.github.io/document-templating-service/docs/error-handling.html
104+
https://etherisc-services.github.io/document-templating-service/docs/examples.html
105+
https://etherisc-services.github.io/document-templating-service/docs/image-support.html
106+
https://etherisc-services.github.io/document-templating-service/docs/integration.html
78107
fail: false
79108
format: markdown
80-
output: lychee-report.md
109+
output: deployment-link-check.md
81110
env:
82111
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83112

84-
- name: Upload link check report
113+
- name: Upload deployment link check report
85114
if: always()
86115
uses: actions/upload-artifact@v4
87116
with:
88-
name: link-check-report
89-
path: lychee-report.md
117+
name: deployment-link-check
118+
path: deployment-link-check.md
90119
retention-days: 7
91120

92121
- name: Link check summary
93122
if: always()
94123
run: |
95-
echo "🔗 Link check completed!"
96-
echo "📄 Check the uploaded artifact 'link-check-report' for detailed results."
97-
if [ -f lychee-report.md ]; then
98-
echo "📊 Summary:"
99-
grep -E "🔍 Total|✅ Successful|🚫 Errors" lychee-report.md || echo "Report summary not available"
124+
echo "🔗 Comprehensive link check completed!"
125+
echo "📄 Build-time check: 'build-time-link-check' artifact"
126+
echo "📄 Deployment check: 'deployment-link-check' artifact"
127+
echo ""
128+
echo "📊 Build-time Summary:"
129+
if [ -f build-time-link-check.md ]; then
130+
grep -E "🔍 Total|✅ Successful|🚫 Errors" build-time-link-check.md || echo "Build-time report not found"
131+
fi
132+
echo ""
133+
echo "📊 Deployment Summary:"
134+
if [ -f deployment-link-check.md ]; then
135+
grep -E "🔍 Total|✅ Successful|🚫 Errors" deployment-link-check.md || echo "Deployment report summary not available"
100136
fi

0 commit comments

Comments
 (0)