CI/CD Production Deployment
Deploying to production requires careful attention, as it involves updating the live environment. To ensure that all changes have been thoroughly tested, we only deploy to production after the changes have been merged into the main branch via a pull request (PR) from the staging branch.
Once the pull request is approved and merged, our CI/CD pipeline will automatically trigger the deployment process.
Deployment Trigger:
- Production: Changes are deployed when a PR from
stagingis merged intomain.
⚠️ Please ensure that all changes are tested thoroughly in the staging environment before submitting a pull request for production deployment.
Step-by-Step
-
Submit a Pull Request
When you're confident in your changes, create a pull request from thestagingbranch to themainbranch.- Click on
New pull request.

- Select
base:mainandcompare:staging. Click onCreate pull request.

- Add a title and click on
Create pull request.

- Click on
-
Merge into Main
Merge the changes into themainbranch. This will automatically trigger the deployment to the production environment.

-
CI/CD Workflow
As soon as the pull request is merged, themain.ymlworkflow will be executed. This workflow will:- Skip the
teststage as the environment from staging has already been tested. - Deploy the application to the production environment.
- Apply any necessary migrations and updates to the production database.

- Skip the
-
Verify the Production Deployment
Once the workflow is complete, head over to the AWS Management Console of the Production account. Navigate toLoad balancersand copy theDNS namefor the production environment.Paste the DNS name into the browser to verify that your changes have been successfully deployed.

💡 Always merge with caution! Production deployments affect the live environment, so ensure thorough testing on staging first.
By following these steps, you can confidently deploy updates to production while maintaining a stable and reliable environment for your users.
Great job! Now we can deploy our changes via CI/CD, and the process is fully automated! Next, let’s configure your domain for the backend API.