Skip to content

Commit 339ff35

Browse files
committed
Fix: Add comprehensive CSS verification and ensure PostCSS processing in production builds
1 parent dc6717b commit 339ff35

File tree

2 files changed

+45
-4
lines changed

2 files changed

+45
-4
lines changed

.github/workflows/deploy.yml

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,35 +26,73 @@ jobs:
2626
run: npm run clear || true
2727
- name: Verify PostCSS config
2828
run: cat postcss.config.js
29+
- name: Verify Tailwind config
30+
run: cat tailwind.config.js | head -10
2931
- name: Build website
3032
run: npm run build
3133
env:
3234
NODE_ENV: production
3335
CI: true
36+
# Ensure PostCSS processes CSS
37+
POSTCSS: true
3438

35-
- name: Verify CSS file exists
39+
- name: Verify CSS file exists and is complete
3640
run: |
3741
CSS_FILE=$(find build/assets/css -name "styles.*.css" | head -1)
3842
if [ -z "$CSS_FILE" ]; then
3943
echo "ERROR: CSS file not found!"
4044
exit 1
4145
fi
4246
echo "CSS file found: $CSS_FILE"
43-
echo "CSS file size: $(wc -c < $CSS_FILE) bytes"
47+
CSS_SIZE=$(wc -c < "$CSS_FILE")
48+
echo "CSS file size: $CSS_SIZE bytes"
49+
50+
# Check minimum size (should be substantial)
51+
if [ "$CSS_SIZE" -lt 50000 ]; then
52+
echo "ERROR: CSS file is too small ($CSS_SIZE bytes) - likely incomplete!"
53+
exit 1
54+
fi
55+
4456
# Check if Tailwind classes are present
4557
if grep -q "bg-gradient\|flex\|grid\|hero-section-new" "$CSS_FILE"; then
4658
echo "✓ Tailwind classes found in CSS"
4759
echo "✓ Custom hero classes found in CSS"
4860
else
49-
echo "WARNING: Tailwind classes not found in CSS"
61+
echo "ERROR: Tailwind classes not found in CSS!"
5062
exit 1
5163
fi
64+
5265
# Check for specific hero styles
5366
if grep -q "from-\[#050505\]\|hero-floating-card" "$CSS_FILE"; then
5467
echo "✓ Hero section styles found"
5568
else
56-
echo "WARNING: Hero section styles missing"
69+
echo "ERROR: Hero section styles missing!"
70+
exit 1
71+
fi
72+
73+
# Check for background colors
74+
if grep -q "background.*#050505\|background.*#0a0a0a\|background.*#111625" "$CSS_FILE"; then
75+
echo "✓ Background colors found"
76+
else
77+
echo "WARNING: Background colors may be missing"
78+
fi
79+
80+
# Check for animations
81+
if grep -q "@keyframes\|animation-name\|animate-float\|animate-blob" "$CSS_FILE"; then
82+
echo "✓ Animations found"
83+
else
84+
echo "ERROR: Animations missing!"
85+
exit 1
86+
fi
87+
88+
# Check for CSS variables
89+
if grep -q "--theme-bg\|--dark-bg\|--light-bg" "$CSS_FILE"; then
90+
echo "✓ CSS variables found"
91+
else
92+
echo "WARNING: CSS variables may be missing"
5793
fi
94+
95+
echo "✓ CSS verification passed!"
5896
5997
# Popular action to deploy to GitHub Pages:
6098
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus

docusaurus.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ const config = {
7979
},
8080
}),
8181

82+
plugins: [
83+
require.resolve('./plugins/configure-css-minifier'),
84+
],
8285
};
8386

8487
module.exports = config;

0 commit comments

Comments
 (0)