#!/bin/bash
echo "🚀 Starting Secure Deployment..."
cd /home/sasthost/company.sast.4hoste.com

# 2. تنظيف الـ CSS (فقط الـ imports اللي بتبوظ Next.js)
# لاحظ إننا شلنا أي أمر بيمسح remixicon عشان نسيب السطر اللي في الـ layout براحته
find . -type f -name "*.css" -not -path "*/node_modules/*" -exec sed -i '/@import/d' {} +

# 3. البيلد والريستارت
npm install
npm run build
pm2 restart sast-company-front
echo "✅ Done!"
