Is it possible (and if so, is it good practice) for a remote Git repository to deploy to multiple web servers (e.g., a staging server and production server) depending upon branch name? For example, if developer A pushes a commit to remote branch STAGING
, the commit is deployed to the corresponding staging web server, whereas commits (or merges) to branch MASTER
are deployed to the production server.
Does this illustrate a good/reliable workflow? If not, what is a better approach?