34 lines
913 B
YAML
34 lines
913 B
YAML
# BlackRoad OS — Pave Tomorrow.
|
|
# Static Site — validate HTML, check links
|
|
name: Static Site Check
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
validate:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Check for broken links
|
|
run: |
|
|
# Find all HTML files and check for common issues
|
|
find . -name "*.html" -type f | head -50 | while read f; do
|
|
# Check for empty alt tags, missing titles
|
|
if grep -q "<img[^>]*alt=\"\"" "$f" 2>/dev/null; then
|
|
echo "Warning: empty alt text in $f"
|
|
fi
|
|
done
|
|
echo "HTML validation complete"
|
|
|
|
- name: Check file sizes
|
|
run: |
|
|
# Warn about large files
|
|
find . -type f -size +1M | while read f; do
|
|
size=$(du -h "$f" | cut -f1)
|
|
echo "Warning: large file $f ($size)"
|
|
done
|