|
19 | 19 | fetch-depth: 1 |
20 | 20 |
|
21 | 21 | - name: Build with Jekyll |
| 22 | + id: jekyll-build |
22 | 23 | uses: actions/jekyll-build-pages@v1 |
23 | 24 | with: |
24 | 25 | source: . |
|
28 | 29 | verbose: true |
29 | 30 | token: ${{ secrets.GITHUB_TOKEN }} |
30 | 31 |
|
| 32 | + - name: Check for build warnings |
| 33 | + run: | |
| 34 | + echo "🔍 Checking for potential Jekyll warnings..." |
| 35 | + |
| 36 | + # Check for YAML front matter issues in markdown files |
| 37 | + YAML_ERRORS=0 |
| 38 | + find . -name "*.md" -not -path "./_site/*" -not -path "./vendor/*" -not -path "./docs/external/*" | while read file; do |
| 39 | + if head -20 "$file" | grep -q "^---$" && head -20 "$file" | tail -n +2 | grep -q "^---$"; then |
| 40 | + # File has front matter, check for common YAML issues |
| 41 | + FRONT_MATTER=$(awk '/^---$/{if(NF==1 && !f) f=NR; if(f && NR>f) exit} f && NR>f{print}' "$file") |
| 42 | + if echo "$FRONT_MATTER" | grep -E '^\s*[^:]+\s+[^:]+\s*$'; then |
| 43 | + echo "⚠️ Potential YAML syntax issue in $file" |
| 44 | + echo "$FRONT_MATTER" | grep -E '^\s*[^:]+\s+[^:]+\s*$' | head -3 |
| 45 | + YAML_ERRORS=$((YAML_ERRORS + 1)) |
| 46 | + fi |
| 47 | + fi |
| 48 | + done |
| 49 | + |
| 50 | + |
| 51 | + # Check for common Jekyll configuration issues |
| 52 | + if grep -q "baseurl.*github.io" _config.yml 2>/dev/null; then |
| 53 | + echo "⚠️ Warning: baseurl may contain github.io domain - this might cause issues with custom domains" |
| 54 | + fi |
| 55 | + |
| 56 | + echo "✅ Warning check completed" |
| 57 | +
|
31 | 58 | - name: Test build artifacts |
32 | 59 | run: | |
33 | 60 | if [ ! -d "_site" ]; then |
|
46 | 73 | echo " - HTML files: $(find _site -name "*.html" | wc -l)" |
47 | 74 | echo " - CSS files: $(find _site -name "*.css" | wc -l)" |
48 | 75 | echo " - JS files: $(find _site -name "*.js" | wc -l)" |
| 76 | + |
| 77 | + echo "" |
| 78 | + echo "💡 Note: Check the 'Build with Jekyll' step above for any warnings in the build output" |
0 commit comments