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:
juanatsap
2025-11-30 12:38:31 +00:00
parent 95de841e14
commit 00e28906e6
3 changed files with 25 additions and 14 deletions
+12
View File
@@ -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..."