9797 run : npm run build
9898 env :
9999 NODE_ENV : production
100+ NEXT_PUBLIC_SUPABASE_URL : ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
101+ NEXT_PUBLIC_SUPABASE_ANON_KEY : ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
102+ SUPABASE_SERVICE_ROLE_KEY : ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}
100103
101104 - name : Analyze bundle size
102105 run : npm run build:analyze
@@ -284,12 +287,7 @@ jobs:
284287 curl -X POST "https://api.resend.com/emails" \
285288 -H "Authorization: Bearer ${{ secrets.RESEND_API_KEY }}" \
286289 -H "Content-Type: application/json" \
287- -d '{
288- "from": "alerts@codeunia.com",
289- "to": ["connect@codeunia.com"],
290- "subject": "🚀 Production Deployment Successful",
291- "html": "<h2>Production Deployment Successful</h2><p>Your Codeunia application has been successfully deployed to production.</p><p><strong>Branch:</strong> ${{ github.ref_name }}</p><p><strong>Commit:</strong> ${{ github.sha }}</p><p><strong>Deployed by:</strong> ${{ github.actor }}</p>"
292- }'
290+ -d "{\"from\":\"alerts@codeunia.com\",\"to\":[\"connect@codeunia.com\"],\"subject\":\"🚀 Production Deployment Successful\",\"html\":\"<h2>Production Deployment Successful</h2><p>Your Codeunia application has been successfully deployed to production.</p><p><strong>Branch:</strong> ${{ github.ref_name }}</p><p><strong>Commit:</strong> ${{ github.sha }}</p><p><strong>Deployed by:</strong> ${{ github.actor }}</p>\"}"
293291
294292 # Rollback on Failure
295293 rollback :
@@ -299,6 +297,9 @@ jobs:
299297 if : failure()
300298 environment : production
301299 steps :
300+ - name : Checkout code
301+ uses : actions/checkout@v4
302+
302303 - name : Rollback deployment
303304 uses : amondnet/vercel-action@v25
304305 with :
@@ -312,12 +313,7 @@ jobs:
312313 curl -X POST "https://api.resend.com/emails" \
313314 -H "Authorization: Bearer ${{ secrets.RESEND_API_KEY }}" \
314315 -H "Content-Type: application/json" \
315- -d '{
316- "from": "alerts@codeunia.com",
317- "to": ["connect@codeunia.com"],
318- "subject": "⚠️ Production Deployment Failed - Rollback Initiated",
319- "html": "<h2>Production Deployment Failed</h2><p>Your Codeunia application deployment failed and rollback has been initiated.</p><p><strong>Branch:</strong> ${{ github.ref_name }}</p><p><strong>Commit:</strong> ${{ github.sha }}</p><p><strong>Failed by:</strong> ${{ github.actor }}</p><p><strong>Action:</strong> Please check the deployment logs and fix the issues.</p>"
320- }'
316+ -d "{\"from\":\"alerts@codeunia.com\",\"to\":[\"connect@codeunia.com\"],\"subject\":\"⚠️ Production Deployment Failed - Rollback Initiated\",\"html\":\"<h2>Production Deployment Failed</h2><p>Your Codeunia application deployment failed and rollback has been initiated.</p><p><strong>Branch:</strong> ${{ github.ref_name }}</p><p><strong>Commit:</strong> ${{ github.sha }}</p><p><strong>Failed by:</strong> ${{ github.actor }}</p><p><strong>Action:</strong> Please check the deployment logs and fix the issues.</p>\"}"
321317
322318 # Performance Monitoring
323319 performance :
0 commit comments