You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo"📝 Starting Jekyll build with config: $config"
70
+
echo"⏰ Build start: $(date)"
71
+
echo"📄 Build log: $build_log"
72
+
73
+
# Capture Jekyll output for error analysis
74
+
if bundle exec jekyll build --trace --config _config_base.yml,$config2>&1| tee "$build_log";then
75
+
echo"⏰ Build end: $(date)"
76
+
echo"✅ Jekyll build completed successfully"
77
+
return 0
78
+
else
79
+
local exit_code=$?
80
+
echo"⏰ Build end: $(date)"
81
+
echo"❌ Jekyll build failed with exit code: $exit_code"
82
+
83
+
# Analyze build log for error classification
84
+
echo"🔍 Analyzing build errors for retry eligibility..."
85
+
86
+
# Check for transient network errors that should be retried
87
+
if grep -qiE "(temporary failure in name resolution|connection refused|connection reset|SSL_connect|certificate verify failed|execution expired|timeout|network is unreachable|failed to open tcp connection|socketerror)""$build_log";then
88
+
echo"🌐 Transient network error detected - eligible for retry"
89
+
echo"📋 Network error details:"
90
+
grep -iE "(temporary failure in name resolution|connection refused|connection reset|SSL_connect|certificate verify failed|execution expired|timeout|network is unreachable|failed to open tcp connection|socketerror)""$build_log"| head -3
91
+
return 2 # Retryable error
92
+
fi
93
+
94
+
# Check for permanent errors that should NOT be retried
95
+
if grep -qiE "(liquid.*syntax error|liquid error|argumenterror|no such file or directory|undefined method|unknown tag|was not properly terminated|missing file)""$build_log";then
96
+
echo"🚫 Permanent build error detected - not retrying"
97
+
echo"📋 Error details:"
98
+
grep -iE "(liquid.*syntax error|liquid error|argumenterror|no such file or directory|undefined method|unknown tag|was not properly terminated|missing file)""$build_log"| head -3
99
+
return 1 # Non-retryable error
100
+
fi
101
+
102
+
# If we can't classify the error, treat it as non-retryable to be safe
103
+
echo"❓ Unclassified build error - treating as permanent (not retrying)"
0 commit comments