@@ -279,15 +279,17 @@ jobs:
279279 sleep 30
280280 curl -f ${{ secrets.PRODUCTION_URL }}/api/health || exit 1
281281
282- - name : Notify deployment success
283- if : ${{ secrets.SLACK_WEBHOOK_URL }}
284- uses : 8398a7/action-slack@v3
285- with :
286- status : success
287- channel : ' #deployments'
288- text : ' 🚀 Production deployment successful!'
289- env :
290- SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
282+ - name : Notify deployment success via email
283+ run : |
284+ curl -X POST "https://api.resend.com/emails" \
285+ -H "Authorization: Bearer ${{ secrets.RESEND_API_KEY }}" \
286+ -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+ }'
291293
292294 # Rollback on Failure
293295 rollback :
@@ -305,15 +307,17 @@ jobs:
305307 vercel-project-id : ${{ secrets.VERCEL_PROJECT_ID }}
306308 vercel-args : ' --prod --rollback'
307309
308- - name : Notify rollback
309- if : ${{ secrets.SLACK_WEBHOOK_URL }}
310- uses : 8398a7/action-slack@v3
311- with :
312- status : failure
313- channel : ' #deployments'
314- text : ' ⚠️ Production deployment failed, rollback initiated!'
315- env :
316- SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
310+ - name : Notify rollback via email
311+ run : |
312+ curl -X POST "https://api.resend.com/emails" \
313+ -H "Authorization: Bearer ${{ secrets.RESEND_API_KEY }}" \
314+ -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+ }'
317321
318322 # Performance Monitoring
319323 performance :
0 commit comments