Skip to main content

The system cannot deploy error from GIT repo

Comments

5 comments

  • cPanelMichael
    Hello @SP Hosting, Can you post the contents of the .cpanel.yml file you have setup? Ensure to replace any identifying information about your server with an example. Thank you.
    0
  • SP Hosting
    Just to clarify my GIT repo is directly in the public_html folder, so that is where that file is placed.. Also I have tried several different things in there. But here is whats in it now: .cpanel.yml [COLOR=rgb(85, 85, 85)]--- deployment: tasks: - export DEPLOYPATH=/home/cPuser/public_html - /bin/cp -r * $DEPLOYPATH
    0
  • SP Hosting
    Does anyone have any ideas on what could be wrong?
    0
  • cPanelMichael
    .cpanel.yml [COLOR=rgb(85, 85, 85)]--- deployment: tasks: - export DEPLOYPATH=/home/cPuser/public_html - /bin/cp -r * $DEPLOYPATH

    Hello @SP Hosting, The use of a wildcard character, such as an asterisk to deploy all files, is not recommended. Also, if your deploy path is the same directory as the repo, the command you are using would simply copy all files to the same location. Start by moving your Git repo to a directory above public_html (e.g. /home/username/gitrepo), create a directory named "testing" with a couple of test files, and then update the /home/username/gitrepo/.cpanel.yml file to look like this: --- deployment: tasks: - export DEPLOYPATH=/home/username/public_html/ - /bin/cp -R /home/username/gitrepo/testing $DEPLOYPATH
    Verify this works first, and we can proceed to assist you with tuning the custom deployment command. Thank you.
    0
  • kamm
    The Guide to Git" - Deployment documentation doesn't mention using an absolute path to directories / files that are to be deployed. IMHO something like this would be a more useful example: [CODE=yaml]--- deployment: tasks: - export DEPLOYPATH=/home/cpanel_username/ - /bin/cp -R /home/cpanel_username/repo/public_html $DEPLOYPATH - /bin/cp -R /home/cpanel_username/repo/lib $DEPLOYPATH
    Also, I didn't notice mention of the vc_*_get_deploy.log files which I found helpful once I realised where they were. i.e. log_path: /home/cpanel_username/.cpanel/logs/
    0

Please sign in to leave a comment.