Unfortunately, that doesn't help me much.
2 Deployments? I already have 2 folders and corresponding git branches. Are you suggesting a second cPanel, or, in our case, a second hosting account?
And I use the git command line interface but that is on my local machine. That doesn't have anything to do with what the server does once the changes have been pushed. That is controlled by .cpanel.yml (correct?).
Unless I can view a variable/parameter within the .cpanel.yml script, that specifies how the deployment was started, I don't see this working on a single cPanel.
The only way I can see "2 Deployments" working would be:
- 2 separate hosting accounts/cpanels
- Staging cPanel uses its own cPanel git repo (with 2 branches - master and staging)
- When "staging" pushes are made, since the Staging server hosts the git repo, the changes will be automatically deployed (with "staging" logic in the .cpanel.yml).
- The Prod/master cPanel uses the repo on the Staging cpanel/server (essentially a remote repo).
- Since the Prod cpanel is not hosting the repo, changes need to be deployed manually (going into cPanel and click "Deploy HEAD Commit" - with "master" logic in the .cpanel.yml).
Thoughts?
Thanks