@@ -28,13 +28,15 @@ jobs:
2828 run : cat postcss.config.js
2929 - name : Verify Tailwind config
3030 run : cat tailwind.config.js | head -10
31- - name : Build website
31+ - name : Build website (production)
3232 run : npm run build
3333 env :
3434 NODE_ENV : production
3535 CI : true
36- # Ensure PostCSS processes CSS
36+ # Ensure PostCSS processes CSS correctly
3737 POSTCSS : true
38+ # Force fresh build
39+ FORCE_COLOR : 0
3840
3941 - name : Verify CSS file exists and is complete
4042 run : |
@@ -104,6 +106,25 @@ jobs:
104106 echo ""
105107 echo "✓✓✓ CSS verification PASSED - All critical styles present! ✓✓✓"
106108
109+ - name : Verify built CSS is valid
110+ run : |
111+ CSS_FILE=$(find build/assets/css -name "styles.*.css" | head -1)
112+ if [ -z "$CSS_FILE" ]; then
113+ echo "ERROR: CSS file not found after build!"
114+ exit 1
115+ fi
116+ # Check CSS is not empty and has reasonable size
117+ CSS_SIZE=$(wc -c < "$CSS_FILE")
118+ if [ "$CSS_SIZE" -lt 50000 ]; then
119+ echo "ERROR: CSS file too small ($CSS_SIZE bytes) - build may have failed!"
120+ exit 1
121+ fi
122+ # Try to validate CSS syntax (basic check)
123+ if ! tail -c 100 "$CSS_FILE" | grep -q "}"; then
124+ echo "WARNING: CSS file may be malformed (doesn't end with }"
125+ fi
126+ echo "✓ CSS file is valid and complete ($CSS_SIZE bytes)"
127+
107128 # Popular action to deploy to GitHub Pages:
108129 # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
109130 - name : Deploy to GitHub Pages
@@ -114,6 +135,8 @@ jobs:
114135 publish_dir : ./build
115136 user_name : github-actions[bot]
116137 user_email : 41898282+github-actions[bot]@users.noreply.github.com
117- # Force fresh deployment
138+ # Force fresh deployment to bypass cache
118139 force_orphan : true
119140 cname : kubesimplify.com
141+ # Add nojekyll to prevent GitHub Pages from processing files
142+ disable_nojekyll : false
0 commit comments