I want to deploy my git repository in cpanel. As far as I know to do that I need .cpanel.yml file with several commands in it. My file:
---
deployment:
tasks:
- export DEPLOYPATH=/home/ygolokru/public_html/testForsite/
- /bin/cp * $DEPLOYPATH
However it appeares that it only copies files in the main folder:
For example, I have this file structure:
- css
- style.css
- index.html
It will only copy index.html, but I want it to copy all directory. What should I do for that?
2
Answers
cp -ird $SRCDIR $DEPLOYPATH
If you want to run in a batch mode and overwritten files are not any concern
cp -frd $SRCDIR $DEPLOYPATH
Just change to
This will check subfolders recursively