Skip to content

Commit 2902cb1

Browse files
dalekunceDale Kunce
andauthored
Modernize 2025 clean (#541)
* Fix malformed favicon link path - Correct /assets/graphicsfavicon/ to /assets/graphics/favicon/ - Adds missing slash between 'graphics' and 'favicon' in favicon-32x32.png link - Ensures consistent favicon URL structure across all favicon references This fixes the 404 error for the 32x32 favicon on missingmaps.org * Add debugging to GitHub Actions workflow for CSS build issue - Add debug steps before and after build to check .tmp and _site directories - Look for main.css file location during build process - Investigate why CSS builds locally but not on GitHub Actions * Clean up workflow debugging code - Remove temporary debug steps from deploy.yml - Ready for merge to publish branch to test CSS deployment * Add minimal CSS verification to build step - Check for main.css after build completes - Will help diagnose any CSS build issues in GitHub Actions - Non-disruptive logging only * Add comprehensive site asset verification to deployment workflow - Verify critical CSS, JavaScript, and font files exist and have reasonable sizes - Check for essential pages (home, about, beginner, host, blog) - Validate all language versions (en, es, fr, cs) are built - Display build summary with total files and size - Fail deployment if any critical assets are missing - Provides detailed logging for troubleshooting build issues * Fix critical Sass compilation issue causing missing CSS - Remove redundant local util/ directory that was shadowing Foundation's util files - Fix Foundation Sites util import path in _settings.scss - This was the root cause of main.css not being generated during builds - Sass was failing silently, showing false success while no CSS files were created - Explains why main.css worked locally initially but failed on GitHub Actions * Fix Foundation Sites util import path for Sass compilation - Use absolute path to Foundation's util/util from node_modules - Resolves the 'Can't find stylesheet to import' error - main.css now generates successfully (312KB) - Critical fix for CSS deployment issue on GitHub Actions - Removes the conflict between local and Foundation util paths --------- Co-authored-by: Dale Kunce <dalekunce@Dales-MacBook-Air.local>
1 parent 67ad46e commit 2902cb1

3 files changed

Lines changed: 153 additions & 11 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 151 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,81 @@ jobs:
4242
env:
4343
JEKYLL_ENV: production
4444

45+
- name: Verify site assets
46+
run: |
47+
echo "=== Verifying critical site assets ==="
48+
49+
# Check for CSS files
50+
if [ ! -f "_site/assets/styles/main.css" ]; then
51+
echo "❌ CRITICAL: main.css not found"
52+
exit 1
53+
else
54+
echo "✅ main.css found ($(wc -c < _site/assets/styles/main.css) bytes)"
55+
fi
56+
57+
# Check for JavaScript files
58+
if [ ! -f "_site/assets/scripts/main.min.js" ]; then
59+
echo "❌ CRITICAL: main.min.js not found"
60+
exit 1
61+
else
62+
echo "✅ main.min.js found ($(wc -c < _site/assets/scripts/main.min.js) bytes)"
63+
fi
64+
65+
# Check for essential fonts
66+
FONT_COUNT=$(find _site/assets/fonts -name "*.woff2" 2>/dev/null | wc -l)
67+
if [ "$FONT_COUNT" -lt 3 ]; then
68+
echo "❌ CRITICAL: Missing fonts (found $FONT_COUNT, expected at least 3)"
69+
exit 1
70+
else
71+
echo "✅ Fonts found ($FONT_COUNT .woff2 files)"
72+
fi
73+
74+
# Check for favicon
75+
if [ ! -f "_site/assets/graphics/favicon/favicon.ico" ]; then
76+
echo "❌ WARNING: favicon.ico not found"
77+
else
78+
echo "✅ favicon.ico found"
79+
fi
80+
81+
# Check for critical pages
82+
CRITICAL_PAGES=("index.html" "about/index.html" "beginner/index.html" "host/index.html" "blog/index.html")
83+
for page in "${CRITICAL_PAGES[@]}"; do
84+
if [ ! -f "_site/$page" ]; then
85+
echo "❌ CRITICAL: Page $page not found"
86+
exit 1
87+
else
88+
echo "✅ Page $page found"
89+
fi
90+
done
91+
92+
# Check for language versions
93+
LANGUAGES=("en" "es" "fr" "cs")
94+
for lang in "${LANGUAGES[@]}"; do
95+
if [ "$lang" = "en" ]; then
96+
# English is at root
97+
if [ ! -f "_site/index.html" ]; then
98+
echo "❌ CRITICAL: English homepage not found"
99+
exit 1
100+
fi
101+
else
102+
if [ ! -f "_site/$lang/index.html" ]; then
103+
echo "❌ CRITICAL: $lang homepage not found"
104+
exit 1
105+
else
106+
echo "✅ $lang homepage found"
107+
fi
108+
fi
109+
done
110+
111+
# Summary statistics
112+
TOTAL_FILES=$(find _site -type f | wc -l)
113+
TOTAL_SIZE=$(du -sh _site | cut -f1)
114+
echo ""
115+
echo "=== Build Summary ==="
116+
echo "Total files: $TOTAL_FILES"
117+
echo "Total size: $TOTAL_SIZE"
118+
echo "✅ All critical assets verified successfully"
119+
45120
- name: Upload build artifacts
46121
uses: actions/upload-artifact@v4
47122
with:
@@ -112,25 +187,92 @@ jobs:
112187
# Use rsync for more reliable copying
113188
rsync -av --exclude='.git' _site/ .
114189
115-
# Alternative: Use find and cp for better reliability
116-
# find _site -mindepth 1 -maxdepth 1 -exec cp -r {} . \;
117-
118190
echo "Copy completed. Removing _site directory..."
119191
rm -rf _site
120192
else
121193
echo "Error: _site directory is empty or does not exist"
122194
exit 1
123195
fi
196+
197+
- name: Verify rsync deployment
198+
run: |
199+
echo "=== Verifying rsync deployment was successful ==="
200+
201+
# Check critical assets were copied correctly
202+
CRITICAL_ASSETS=(
203+
"assets/styles/main.css"
204+
"assets/scripts/main.min.js"
205+
"assets/graphics/favicon/favicon.ico"
206+
"index.html"
207+
"about/index.html"
208+
"beginner/index.html"
209+
"host/index.html"
210+
"blog/index.html"
211+
)
212+
213+
MISSING_ASSETS=()
214+
215+
for asset in "${CRITICAL_ASSETS[@]}"; do
216+
if [ -f "$asset" ]; then
217+
SIZE=$(wc -c < "$asset")
218+
echo "✅ $asset found ($SIZE bytes)"
219+
else
220+
echo "❌ CRITICAL: $asset missing after rsync"
221+
MISSING_ASSETS+=("$asset")
222+
fi
223+
done
224+
225+
# Check language versions
226+
LANGUAGES=("es" "fr" "cs")
227+
for lang in "${LANGUAGES[@]}"; do
228+
if [ -f "$lang/index.html" ]; then
229+
echo "✅ $lang/index.html found"
230+
else
231+
echo "❌ CRITICAL: $lang/index.html missing after rsync"
232+
MISSING_ASSETS+=("$lang/index.html")
233+
fi
234+
done
235+
236+
# Check font files
237+
FONT_COUNT=$(find assets/fonts -name "*.woff2" 2>/dev/null | wc -l)
238+
if [ "$FONT_COUNT" -ge 3 ]; then
239+
echo "✅ Font files found ($FONT_COUNT .woff2 files)"
240+
else
241+
echo "❌ CRITICAL: Insufficient font files after rsync (found $FONT_COUNT, expected ≥3)"
242+
MISSING_ASSETS+=("fonts")
243+
fi
124244
245+
# Summary
246+
if [ ${#MISSING_ASSETS[@]} -eq 0 ]; then
247+
TOTAL_FILES=$(find . -type f -not -path './.git/*' | wc -l)
248+
TOTAL_SIZE=$(du -sh . --exclude=.git | cut -f1)
249+
echo ""
250+
echo "✅ rsync deployment verification PASSED"
251+
echo "📊 Deployed $TOTAL_FILES files ($TOTAL_SIZE total)"
252+
echo "🚀 Ready for commit and push"
253+
else
254+
echo ""
255+
echo "❌ rsync deployment verification FAILED"
256+
echo "Missing assets:"
257+
for asset in "${MISSING_ASSETS[@]}"; do
258+
echo " - $asset"
259+
done
260+
echo ""
261+
echo "=== Debug: Current directory structure ==="
262+
ls -la
263+
echo "=== Debug: assets directory ==="
264+
ls -la assets/ 2>/dev/null || echo "assets directory not found"
265+
echo "=== Debug: Searching for any CSS files ==="
266+
find . -name "*.css" -type f -not -path './.git/*' || echo "No CSS files found"
267+
exit 1
268+
fi
269+
270+
- name: Commit and push changes
271+
run: |
272+
# Debug: Show final directory structure
125273
# Debug: Show final directory structure
126274
echo "=== Final directory structure ==="
127275
ls -la
128-
echo "=== assets directory ==="
129-
ls -la assets/ || echo "No assets directory found"
130-
echo "=== assets/styles directory ==="
131-
ls -la assets/styles/ || echo "No assets/styles directory found"
132-
echo "=== Checking for main.css ==="
133-
find . -name "main.css" -type f || echo "main.css not found"
134276
135277
# Add and commit changes
136278
git add -A

app/_layouts/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<link rel="icon" type="image/png" href="/assets/graphics/favicon/favicon-160x160.png" sizes="160x160">
4141
<link rel="icon" type="image/png" href="/assets/graphics/favicon/favicon-96x96.png" sizes="96x96">
4242
<link rel="icon" type="image/png" href="/assets/graphics/favicon/favicon-16x16.png" sizes="16x16">
43-
<link rel="icon" type="image/png" href="/assets/graphicsfavicon/favicon-32x32.png" sizes="32x32">
43+
<link rel="icon" type="image/png" href="/assets/graphics/favicon/favicon-32x32.png" sizes="32x32">
4444

4545
<meta name="description" content="Putting the World's Vulnerable People on the Map">
4646
<meta itemprop="name" content="MissingMaps">

app/assets/styles/_settings.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
// 55. Top Bar
6565
// 56. Xy Grid
6666

67-
@import 'util/util';
67+
@import '../../../node_modules/foundation-sites/scss/util/util';
6868

6969
// 1. Global
7070
// ---------

0 commit comments

Comments
 (0)