Files
Zero/.github/workflows
Rahul Mishra 40cf7d2313 chore: make deploy CI better (#1162)
### TL;DR

Improved the production deployment workflow with better error handling and clearer instructions.

### What changed?

- Renamed `auto-merge-prod.yml` to `deploy-to-prod-command.yml` to better reflect its purpose
- Updated workflow name from "Deploy Production" to "Deploy to Production Command"
- Changed job name to "Merge Staging to Production" for clarity
- Added proper error handling when rebase fails by posting a comment to the PR instead of failing silently
- Added explicit condition for the push step to only run when rebase succeeds
- Updated the sync-production workflow to include clear instructions in the PR body instead of creating a draft PR
- Added guidance in the PR body explaining how to deploy using the `/deploy` command

### How to test?

1. Create a PR from staging to main
2. Comment `/deploy` on the PR to trigger the deployment workflow
3. Verify that the workflow correctly merges staging into main when possible
4. Test the error case by creating a conflict between staging and main, then verify the workflow posts a helpful error comment

### Why make this change?

This change improves the developer experience by providing clearer feedback during the deployment process. The improved error handling helps developers understand when manual intervention is needed, and the updated PR template provides explicit instructions on how to complete the deployment. Renaming the workflow files and jobs also makes their purpose more obvious to team members.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **Chores**
  - Updated deployment workflow to require a specific comment format and label for production deploys.
  - Enhanced error handling during rebase with clearer instructions for manual intervention.
  - Automated pull requests for syncing staging to production now include deployment instructions, a production-deploy label, and are no longer created as drafts.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-30 22:31:13 +05:30
..