Reputation: 23
I am using Cpanel to host my website and I have two domains. I am trying to get the yml file to deploy to two directories. I would like it so that when I go to the git version control option in Cpanel and update and deploy all files and folders are deployed in both locations for each website.
deployment:
tasks:
- export DEPLOYPATH=/home/userName/public_html
- export DEPLOYPATH=/home/userName/website.pizza
- /bin/cp index.html $DEPLOYPATH
- /bin/cp -R assets $DEPLOYPATH
- /bin/cp -R images $DEPLOYPATH
Putting two export Deployment Paths does not seem to work and will not deploy to both locations. If anyone knows how to do this please let me know!
Upvotes: 1
Views: 717
Reputation: 1327384
The official CPanel documentation does not mention that scenario.
But this thread shows a more elaborate set of tasks, so check if this sequence would work:
deployment:
tasks:
- export DEPLOYPATH=/home/userName/public_html
- /bin/cp index.html $DEPLOYPATH
- /bin/cp -R assets $DEPLOYPATH
- /bin/cp -R images $DEPLOYPATH
- export DEPLOYPATH=/home/userName/website.pizza
- /bin/cp index.html $DEPLOYPATH
- /bin/cp -R assets $DEPLOYPATH
- /bin/cp -R images $DEPLOYPATH
Upvotes: 1