fix: Resolve CSS bundling in production and lint errors
- Fix golangci-lint errcheck errors by using t.Setenv() instead of os.Setenv() - Add CSS bundle build step to deploy workflow for production - Add graceful fallback to modular CSS if bundle doesn't exist - Remove unused os import from preferences_test.go
This commit is contained in:
@@ -46,6 +46,18 @@ jobs:
|
||||
|
||||
git pull origin main
|
||||
|
||||
# Build CSS bundle for production
|
||||
echo "🎨 Building CSS bundle..."
|
||||
if command -v lightningcss &> /dev/null; then
|
||||
mkdir -p static/dist
|
||||
lightningcss --bundle --minify static/css/main.css -o static/dist/bundle.min.css
|
||||
echo "✅ CSS bundle created ($(du -h static/dist/bundle.min.css | cut -f1))"
|
||||
else
|
||||
echo "⚠️ lightningcss not found, falling back to modular CSS"
|
||||
# Ensure dist directory doesn't exist so template falls back to main.css
|
||||
rm -rf static/dist
|
||||
fi
|
||||
|
||||
# Reapply stashed changes if any (optional - comment out if not needed)
|
||||
# if git stash list | grep -q "Auto-stash"; then
|
||||
# echo "♻️ Reapplying stashed changes..."
|
||||
|
||||
Reference in New Issue
Block a user