@@ -187,25 +187,92 @@ jobs:
187187 # Use rsync for more reliable copying
188188 rsync -av --exclude='.git' _site/ .
189189
190- # Alternative: Use find and cp for better reliability
191- # find _site -mindepth 1 -maxdepth 1 -exec cp -r {} . \;
192-
193190 echo "Copy completed. Removing _site directory..."
194191 rm -rf _site
195192 else
196193 echo "Error: _site directory is empty or does not exist"
197194 exit 1
198195 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
199224
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
244+
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
200273 # Debug: Show final directory structure
201274 echo "=== Final directory structure ==="
202275 ls -la
203- echo "=== assets directory ==="
204- ls -la assets/ || echo "No assets directory found"
205- echo "=== assets/styles directory ==="
206- ls -la assets/styles/ || echo "No assets/styles directory found"
207- echo "=== Checking for main.css ==="
208- find . -name "main.css" -type f || echo "main.css not found"
209276
210277 # Add and commit changes
211278 git add -A
0 commit comments