Git, staging vs production, and YML
I've been trying a new workflow for deploying sites that has been working pretty well for me so far.
- Create staging.website.com
- Create git repo in cPanel account
- Add as "staging" remote from my workstation
- Add a .cpanel.yml file to my project for deployment
-
b) Add the copy commands to the post-receive hook file in the repo.
Hello @tailored, Have you considered using multiple branches (e.g. staging, production) in the same repo instead? If you did that, then you should be able to make implement an if/then condition that runs different commands depending on the branch name like the example here: post-receive hook for multiple branches Thank you.0 -
in this case do I need a yml file that does nothing? since the work is done in the hook? 0
Please sign in to leave a comment.
Comments
3 comments