skip to Main Content

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


  1. cp -ird $SRCDIR $DEPLOYPATH
    If you want to run in a batch mode and overwritten files are not any concern
    cp -frd $SRCDIR $DEPLOYPATH

    Login or Signup to reply.
  2. Just change to

    - /bin/cp -fr * $DEPLOYPATH
    

    This will check subfolders recursively

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search