Issue
I have configured CPanel with GitHub repository, but I can not write my .cpanel.yml file properly, because there is no execution when I try to deploy HEAD commit. Here it is my .yml:
---
deployment:
tasks:
- export DEPLOYPATH=/home/tita8rfx/public_html/try/protected
- /bin/cp -r components $DEPLOYPATH
- /bin/cp -r controllers $DEPLOYPATH
- export DEPLOYPATH=/home/tita8rfx/public_html/try/assets
- /bin/cp style.css $DEPLOYPATH
- /bin/cp app.js $DEPLOYPATH
- export DEPLOYPATH=/home/tita8rfx/public_html/try/protected/views
- /bin/cp -r app $DEPLOYPATH
I also have tried:
---
deployment:
tasks:
- export DEPLOYPATH=/home/tita8rfx/public_html/try
- /bin/cp -r /protected/components $DEPLOYPATH
- /bin/cp -r /protected/controllers $DEPLOYPATH
- /bin/cp /assets/style.css $DEPLOYPATH
- /bin/cp /assets/app.js $DEPLOYPATH
- /bin/cp -r /protected/views/app $DEPLOYPATH
What I want this code to do is to modify the following folders:
- /home/tita8rfx/public_html/try/protected/components
- /home/tita8rfx/public_html/try/protected/controllers
- /home/tita8rfx/public_html/try/protected/views/app
and the following files:
- /home/tita8rfx/public_html/try/assets/style.css
- /home/tita8rfx/public_html/try/assets/app.js
But there is no execution or error and I cannot get what the problem is.
Solution
I guess I have found my problem. Here it is the solution. I had to be more adverbial in the paths from which the updated data should be get.
---
deployment:
tasks:
- export DEPLOYPATH=/home/tita8rfx/public_html/titanbg-hs.com/protected
- /bin/cp -r /home/tita8rfx/repositories/hsapp/protected/components $DEPLOYPATH
- /bin/cp -r /home/tita8rfx/repositories/hsapp/protected/controllers $DEPLOYPATH
- /bin/cp -r /home/tita8rfx/repositories/hsapp/protected/models $DEPLOYPATH
- export DEPLOYPATH=/home/tita8rfx/public_html/titanbg-hs.com/assets
- /bin/cp /home/tita8rfx/repositories/hsapp/assets/style.css $DEPLOYPATH
- /bin/cp /home/tita8rfx/repositories/hsapp/assets/app.js $DEPLOYPATH
- export DEPLOYPATH=/home/tita8rfx/public_html/titanbg-hs.com/protected/views
- /bin/cp -r /home/tita8rfx/repositories/hsapp/protected/views/app $DEPLOYPATH
- /bin/cp -r /home/tita8rfx/repositories/hsapp/protected/views/tpl $DEPLOYPATH
I hope this will help someone with the same problem as mine.
Answered By - Даяна Димитрова Answer Checked By - Willingham (WPSolving Volunteer)