Yes, there is a better way to do this, and it is through a practice known as Continuous Delivery!
The practice of continuous delivery, in Portuguese, or simply CD, is responsible for executing the deploy in the necessary environments thus performing the delivery of the application. Usually there are development environments (DEV), homologation (HMG) or production (PRD), or only DEV and PRD, or only PRD but with use of slots, common in Azure when using Webapp,... Or in the case of mobile application your last environment can be the very store where you will make the app available to users. Whatever the amount and purpose of your environments you need an orchestration between them to make this deployment, or installation.
When you’re developing, you’ll want any commit in the repository to be installed in the DEV environment. Already in approval only when you have some ready, functional Feature. And in production only when the customer approves or is approved. For this process to work it is necessary to orchestrate the deploy between these environments. Several tools can do this, including some also the code integration step, where compilation or transpilation is done, unit tests are run, and whatever else is needed to generate an installable artifact.
Suggestions:
- Azure Devops, works not only with Azure, but aws and with local
- Github Actions, latest, but if your code is already on Github, it might be a good alternative
- Relate the item, you must install or run from a container, you can even run it on some cloud