@@ -169,18 +169,87 @@ jobs:
169169 bundler-cache : true
170170 working-directory : docs
171171
172- - name : Build Jekyll site
172+ - name : Trace Jekyll Build Process
173173 run : |
174- echo "🔨 Building Jekyll site..."
175- echo "Current directory: $(pwd)"
176- echo "Jekyll config:"
177- bundle exec jekyll doctor
178- echo ""
179- echo "Starting Jekyll build..."
180- bundle exec jekyll build --baseurl="/node-syslog" --verbose --trace
181- echo "✅ Jekyll build completed"
182- echo "Build output directory contents:"
183- ls -la _site/ || echo "_site directory not found"
174+ echo "=== Jekyll Environment ==="
175+ bundle exec jekyll --version
176+ bundle list | grep -E "(jekyll|just-the-docs|sass)"
177+
178+ echo "=== Jekyll Doctor Diagnosis ==="
179+ bundle exec jekyll doctor --trace
180+
181+ echo "=== Build Configuration ==="
182+ echo "Theme config:"
183+ grep -E "^(theme|remote_theme)" _config.yml
184+ echo "Baseurl config:"
185+ grep -E "^baseurl" _config.yml
186+
187+ echo "=== Starting Verbose Build ==="
188+ bundle exec jekyll build --baseurl="/node-syslog" --verbose --trace 2>&1 | tee build.log
189+
190+ echo "=== Build Log Analysis ==="
191+ echo "Theme-related messages:"
192+ grep -i "theme\|layout\|sass" build.log || echo "No theme messages found"
193+
194+ echo "=== Generated Site Structure ==="
195+ find _site -type f -name "*.html" | wc -l
196+ find _site -type f -name "*.css" | wc -l
197+ find _site -type f -name "*.js" | wc -l
198+
199+ echo "=== Critical Files Check ==="
200+ for file in index.html _api/index.html; do
201+ if [ -f "_site/$file" ]; then
202+ echo "✅ _site/$file exists"
203+ echo "First 50 lines:"
204+ head -50 "_site/$file"
205+ echo "---"
206+ else
207+ echo "❌ _site/$file missing"
208+ fi
209+ done
210+ working-directory : docs
211+
212+ - name : Analyze HTML Structure
213+ run : |
214+ echo "=== HTML Structure Validation ==="
215+ for html_file in $(find _site -name "*.html" -type f | head -5); do
216+ echo "=== Analyzing: $html_file ==="
217+ echo "Has DOCTYPE:"
218+ head -1 "$html_file" | grep -i "<!DOCTYPE" && echo "✅" || echo "❌"
219+ echo "Has <html>:"
220+ grep -q "<html" "$html_file" && echo "✅" || echo "❌"
221+ echo "Has <head>:"
222+ grep -q "<head" "$html_file" && echo "✅" || echo "❌"
223+ echo "Has <body>:"
224+ grep -q "<body" "$html_file" && echo "✅" || echo "❌"
225+ echo "Has <nav>:"
226+ grep -q "<nav" "$html_file" && echo "✅" || echo "❌"
227+ echo "Has theme CSS link:"
228+ grep -q "just-the-docs.*css\|main.*css" "$html_file" && echo "✅" || echo "❌"
229+ echo "---"
230+ done
231+ working-directory : docs
232+
233+ - name : Check Theme Asset Generation
234+ run : |
235+ echo "=== Theme Assets Investigation ==="
236+ echo "CSS files in _site:"
237+ find _site -name "*.css" -type f | sort
238+
239+ echo "JS files in _site:"
240+ find _site -name "*.js" -type f | sort
241+
242+ echo "SASS processing check:"
243+ if find _site -name "*.css" | grep -q "just-the-docs"; then
244+ echo "✅ just-the-docs CSS found"
245+ else
246+ echo "❌ just-the-docs CSS missing"
247+ echo "All CSS files:"
248+ find _site -name "*.css" -exec ls -la {} \;
249+ fi
250+
251+ echo "Asset directory structure:"
252+ find _site/assets -type f 2>/dev/null | head -20 || echo "No assets directory"
184253 working-directory : docs
185254
186255 - name : Add .nojekyll
@@ -240,31 +309,51 @@ jobs:
240309 keep_files : false
241310 # cname: node-syslog.schamane.de
242311
243- - name : List deployed files (requires GH_TOKEN)
244- if : env.GH_TOKEN != ''
312+ - name : Verify Deployment via GitHub API
313+ env :
314+ GH_TOKEN : ${{ secrets.GH_TOKEN }}
245315 run : |
246- echo "📁 Files deployed to gh-pages:"
247- gh api repos/:owner/:repo/pages/build/latest | jq -r '.artifacts[].name' 2>/dev/null || echo "Using fallback listing..."
248-
249- # Fallback listing
250- echo "📁 Available files in _site:"
251- find docs/_site -name "*.html" -o -name "*.css" -o -name "*.js" -o -name "*.svg" | sort | head -10
252- echo "..."
253- echo "Total HTML files: $(find docs/_site -name "*.html" | wc -l)"
254- echo "Total CSS files: $(find docs/_site -name "*.css" | wc -l)"
255- echo "Total JS files: $(find docs/_site -name "*.js" | wc -l)"
316+ echo "=== Checking gh-pages branch ==="
317+ gh api repos/${{ github.repository }}/git/refs/heads/gh-pages || echo "gh-pages branch not found"
318+
319+ echo "=== Latest deployment commit ==="
320+ gh api repos/${{ github.repository }}/commits?sha=gh-pages&per_page=1 | jq -r '.[0].commit.message'
321+
322+ echo "=== Checking deployed files via API ==="
323+ gh api repos/${{ github.repository }}/git/trees/gh-pages?recursive=1 | jq -r '.tree[] | select(.type == "blob") | .path' | grep -E "\\.(html|css|js)$" | head -20
324+
325+ echo "=== Fetching and analyzing deployed index.html ==="
326+ gh api repos/${{ github.repository }}/contents/index.html?ref=gh-pages | jq -r '.content' | base64 -d | head -50
327+
328+ echo "=== Checking for theme assets in deployment ==="
329+ gh api repos/${{ github.repository }}/git/trees/gh-pages?recursive=1 | jq -r '.tree[] | .path' | grep -E "(just-the-docs|main|style).*\\.(css|js)" || echo "No theme assets found"
330+
331+ - name : Live Site Validation
256332 env :
257333 GH_TOKEN : ${{ secrets.GH_TOKEN }}
258-
259- - name : List deployed files (fallback)
260- if : env.GH_TOKEN == ''
261334 run : |
262- echo "📁 Files deployed to gh-pages:"
263- echo "📁 Available files in _site:"
264- find docs/_site -name "*.html" -o -name "*.css" -o -name "*.js" -o -name "*.svg" | sort | head -10
265- echo "..."
266- echo "Total HTML files: $(find docs/_site -name "*.html" | wc -l)"
267- echo "Total CSS files: $(find docs/_site -name "*.css" | wc -l)"
268- echo "Total JS files: $(find docs/_site -name "*.js" | wc -l)"
269- echo ""
270- echo "📖 Documentation available at: https://schamane.github.io/node-syslog/"
335+ echo "=== Waiting for deployment to propagate ==="
336+ sleep 15
337+
338+ echo "=== Testing live site ==="
339+ SITE_URL="https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/"
340+ echo "Testing URL: $SITE_URL"
341+
342+ echo "=== Fetching live site HTML ==="
343+ curl -s "$SITE_URL" | head -100 | tee live-site.html
344+
345+ echo "=== Analyzing live site structure ==="
346+ echo "Has DOCTYPE:"
347+ grep -i "<!DOCTYPE" live-site.html && echo "✅" || echo "❌"
348+
349+ echo "Has <nav> element:"
350+ grep "<nav" live-site.html && echo "✅" || echo "❌"
351+
352+ echo "Has theme CSS:"
353+ grep -E "just-the-docs.*css|main.*css" live-site.html && echo "✅" || echo "❌"
354+
355+ echo "Title tag:"
356+ grep "<title>" live-site.html || echo "No title found"
357+
358+ echo "=== Checking HTTP headers ==="
359+ curl -I "$SITE_URL"
0 commit comments