At a very high level, we can achieve this with the below set of steps:
Create a feature branch that will store our code base.
Create a pull request to merge the code after we’re sure to the Dev branch.
Publish the code from dev to generate ARM templates.
This can trigger an automated CI/CD DevOps pipeline to promote code to higher environments like Staging or Production.