Issues with the format of .cpanel.yml file when trying to deploy cpanel git repository to directory.





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







3
















  • I am using a cpanel web administration system.

  • With it i create a git repository.

  • I am able to push my local code to that git repository.


The problem arises when i attempt to deploy the code in the repository to a production directory on my server.



According to cpanel documentation about deployment, in order to deploy, a git repository must contain a .cpanel.yml file which is committed with the following example data:



---
deployment:
tasks:
- export DEPLOYPATH=/home/user/public_html/
- /bin/cp index.html $DEPLOYPATH
- /bin/cp style.css $DEPLOYPATH


I have tried various different configurations of this file in order to be able to deploy but couldn't get it to work. I cannot find any more documentation or any further develop examples or sample files.



The relevant structure of my linux server is thus:



home/<username>/
- git/gitrepo/
- all of the git files and folders
- public_html/<app_folder>/


I would like to deploy all of the files and folders in the git repository into the public_html/<app_folder>/ directory.



I have tried the following different configurations:



---
deployment:
tasks:
- export DEPLOYPATH=/home/<username>/public_html/<app_folder>
- / $DEPLOYPATH

---
deployment:
tasks:
- export DEPLOYPATH=/home/user/public_html/
- /bin/cp $DEPLOYPATH

---
deployment:
tasks:
- export DEPLOYPATH=/home/user/public_html/
- / index.html $DEPLOYPATH // Tried just one file to see if would work but it didn't.
---
deployment:
tasks:
- export DEPLOYPATH=/home/user/public_html/
- /bin/cp index.html $DEPLOYPATH // Tried just one file to see if would work but it didn't.









share|improve this question





























    3
















    • I am using a cpanel web administration system.

    • With it i create a git repository.

    • I am able to push my local code to that git repository.


    The problem arises when i attempt to deploy the code in the repository to a production directory on my server.



    According to cpanel documentation about deployment, in order to deploy, a git repository must contain a .cpanel.yml file which is committed with the following example data:



    ---
    deployment:
    tasks:
    - export DEPLOYPATH=/home/user/public_html/
    - /bin/cp index.html $DEPLOYPATH
    - /bin/cp style.css $DEPLOYPATH


    I have tried various different configurations of this file in order to be able to deploy but couldn't get it to work. I cannot find any more documentation or any further develop examples or sample files.



    The relevant structure of my linux server is thus:



    home/<username>/
    - git/gitrepo/
    - all of the git files and folders
    - public_html/<app_folder>/


    I would like to deploy all of the files and folders in the git repository into the public_html/<app_folder>/ directory.



    I have tried the following different configurations:



    ---
    deployment:
    tasks:
    - export DEPLOYPATH=/home/<username>/public_html/<app_folder>
    - / $DEPLOYPATH

    ---
    deployment:
    tasks:
    - export DEPLOYPATH=/home/user/public_html/
    - /bin/cp $DEPLOYPATH

    ---
    deployment:
    tasks:
    - export DEPLOYPATH=/home/user/public_html/
    - / index.html $DEPLOYPATH // Tried just one file to see if would work but it didn't.
    ---
    deployment:
    tasks:
    - export DEPLOYPATH=/home/user/public_html/
    - /bin/cp index.html $DEPLOYPATH // Tried just one file to see if would work but it didn't.









    share|improve this question

























      3












      3








      3


      4







      • I am using a cpanel web administration system.

      • With it i create a git repository.

      • I am able to push my local code to that git repository.


      The problem arises when i attempt to deploy the code in the repository to a production directory on my server.



      According to cpanel documentation about deployment, in order to deploy, a git repository must contain a .cpanel.yml file which is committed with the following example data:



      ---
      deployment:
      tasks:
      - export DEPLOYPATH=/home/user/public_html/
      - /bin/cp index.html $DEPLOYPATH
      - /bin/cp style.css $DEPLOYPATH


      I have tried various different configurations of this file in order to be able to deploy but couldn't get it to work. I cannot find any more documentation or any further develop examples or sample files.



      The relevant structure of my linux server is thus:



      home/<username>/
      - git/gitrepo/
      - all of the git files and folders
      - public_html/<app_folder>/


      I would like to deploy all of the files and folders in the git repository into the public_html/<app_folder>/ directory.



      I have tried the following different configurations:



      ---
      deployment:
      tasks:
      - export DEPLOYPATH=/home/<username>/public_html/<app_folder>
      - / $DEPLOYPATH

      ---
      deployment:
      tasks:
      - export DEPLOYPATH=/home/user/public_html/
      - /bin/cp $DEPLOYPATH

      ---
      deployment:
      tasks:
      - export DEPLOYPATH=/home/user/public_html/
      - / index.html $DEPLOYPATH // Tried just one file to see if would work but it didn't.
      ---
      deployment:
      tasks:
      - export DEPLOYPATH=/home/user/public_html/
      - /bin/cp index.html $DEPLOYPATH // Tried just one file to see if would work but it didn't.









      share|improve this question















      • I am using a cpanel web administration system.

      • With it i create a git repository.

      • I am able to push my local code to that git repository.


      The problem arises when i attempt to deploy the code in the repository to a production directory on my server.



      According to cpanel documentation about deployment, in order to deploy, a git repository must contain a .cpanel.yml file which is committed with the following example data:



      ---
      deployment:
      tasks:
      - export DEPLOYPATH=/home/user/public_html/
      - /bin/cp index.html $DEPLOYPATH
      - /bin/cp style.css $DEPLOYPATH


      I have tried various different configurations of this file in order to be able to deploy but couldn't get it to work. I cannot find any more documentation or any further develop examples or sample files.



      The relevant structure of my linux server is thus:



      home/<username>/
      - git/gitrepo/
      - all of the git files and folders
      - public_html/<app_folder>/


      I would like to deploy all of the files and folders in the git repository into the public_html/<app_folder>/ directory.



      I have tried the following different configurations:



      ---
      deployment:
      tasks:
      - export DEPLOYPATH=/home/<username>/public_html/<app_folder>
      - / $DEPLOYPATH

      ---
      deployment:
      tasks:
      - export DEPLOYPATH=/home/user/public_html/
      - /bin/cp $DEPLOYPATH

      ---
      deployment:
      tasks:
      - export DEPLOYPATH=/home/user/public_html/
      - / index.html $DEPLOYPATH // Tried just one file to see if would work but it didn't.
      ---
      deployment:
      tasks:
      - export DEPLOYPATH=/home/user/public_html/
      - /bin/cp index.html $DEPLOYPATH // Tried just one file to see if would work but it didn't.






      linux git cpanel






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Oct 7 '18 at 13:31









      aviya.developeraviya.developer

      30410




      30410
























          1 Answer
          1






          active

          oldest

          votes


















          4














          So this is basically a bash script that CPanel runs when you update your repo stored on the server. the layout in your case should be:



          Please remove all "# comments" if you are copying the example or it might not work



          ---
          deployment:
          tasks:
          - export DEPLOYPATH=/home/<username>/public_html/<app_folder>
          - /bin/cp <file_name> $DEPLOYPATH #Copy specific file to destination from root
          - /bin/cp /<sub_folder>/<file_name> $DEPLOYPATH #copy specific file from source sub folder
          - /bin cp * $DEPLOYPATH #copy all from root
          - /bin cp /<sub_folder>/* $DEPLOYPATH #copy all from sub folder root



          So the above should work for you.....but.....



          If you are doing the whole root to destination then here is the one I use to just copy all.



          ---
          deployment:
          tasks:
          - export DEPLOYPATH=/home/<user_name>/public_html #Add /<sub_folder> if required
          - /bin/cp -r * $DEPLOYPATH




          • /bin/cp "copy command"

          • -r "recursive include sub folder / files"

          • '*' "all"


          Remember to add /<sub_folder> if you need an app folder other than public_html



          You can get the file from my repo:



          https://github.com/FrancoisGeyser/cPanel-yml.git



          Hope that helps.






          share|improve this answer


























          • Hey Francois, thank you very much for this thorough answer. I just wanted to say that I'm super busy and will only have time to go through this later on. But i will definitely do so and if it work i will be sure to mark it as the answer. For now i upvoted you. (It can just be quite annoying when you give a good answer and go on ignored so I wanted to let you know that this isn't the case! and welcome to stack-overflow!)

            – aviya.developer
            Dec 3 '18 at 9:09











          • Thanks, much appreciated.

            – Francois
            Dec 5 '18 at 8:04











          • WORKS! Of course Friday night presented the best opportunity to finally check it haha. Thanks a lot man!

            – aviya.developer
            Dec 14 '18 at 21:05












          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52688981%2fissues-with-the-format-of-cpanel-yml-file-when-trying-to-deploy-cpanel-git-repo%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          4














          So this is basically a bash script that CPanel runs when you update your repo stored on the server. the layout in your case should be:



          Please remove all "# comments" if you are copying the example or it might not work



          ---
          deployment:
          tasks:
          - export DEPLOYPATH=/home/<username>/public_html/<app_folder>
          - /bin/cp <file_name> $DEPLOYPATH #Copy specific file to destination from root
          - /bin/cp /<sub_folder>/<file_name> $DEPLOYPATH #copy specific file from source sub folder
          - /bin cp * $DEPLOYPATH #copy all from root
          - /bin cp /<sub_folder>/* $DEPLOYPATH #copy all from sub folder root



          So the above should work for you.....but.....



          If you are doing the whole root to destination then here is the one I use to just copy all.



          ---
          deployment:
          tasks:
          - export DEPLOYPATH=/home/<user_name>/public_html #Add /<sub_folder> if required
          - /bin/cp -r * $DEPLOYPATH




          • /bin/cp "copy command"

          • -r "recursive include sub folder / files"

          • '*' "all"


          Remember to add /<sub_folder> if you need an app folder other than public_html



          You can get the file from my repo:



          https://github.com/FrancoisGeyser/cPanel-yml.git



          Hope that helps.






          share|improve this answer


























          • Hey Francois, thank you very much for this thorough answer. I just wanted to say that I'm super busy and will only have time to go through this later on. But i will definitely do so and if it work i will be sure to mark it as the answer. For now i upvoted you. (It can just be quite annoying when you give a good answer and go on ignored so I wanted to let you know that this isn't the case! and welcome to stack-overflow!)

            – aviya.developer
            Dec 3 '18 at 9:09











          • Thanks, much appreciated.

            – Francois
            Dec 5 '18 at 8:04











          • WORKS! Of course Friday night presented the best opportunity to finally check it haha. Thanks a lot man!

            – aviya.developer
            Dec 14 '18 at 21:05
















          4














          So this is basically a bash script that CPanel runs when you update your repo stored on the server. the layout in your case should be:



          Please remove all "# comments" if you are copying the example or it might not work



          ---
          deployment:
          tasks:
          - export DEPLOYPATH=/home/<username>/public_html/<app_folder>
          - /bin/cp <file_name> $DEPLOYPATH #Copy specific file to destination from root
          - /bin/cp /<sub_folder>/<file_name> $DEPLOYPATH #copy specific file from source sub folder
          - /bin cp * $DEPLOYPATH #copy all from root
          - /bin cp /<sub_folder>/* $DEPLOYPATH #copy all from sub folder root



          So the above should work for you.....but.....



          If you are doing the whole root to destination then here is the one I use to just copy all.



          ---
          deployment:
          tasks:
          - export DEPLOYPATH=/home/<user_name>/public_html #Add /<sub_folder> if required
          - /bin/cp -r * $DEPLOYPATH




          • /bin/cp "copy command"

          • -r "recursive include sub folder / files"

          • '*' "all"


          Remember to add /<sub_folder> if you need an app folder other than public_html



          You can get the file from my repo:



          https://github.com/FrancoisGeyser/cPanel-yml.git



          Hope that helps.






          share|improve this answer


























          • Hey Francois, thank you very much for this thorough answer. I just wanted to say that I'm super busy and will only have time to go through this later on. But i will definitely do so and if it work i will be sure to mark it as the answer. For now i upvoted you. (It can just be quite annoying when you give a good answer and go on ignored so I wanted to let you know that this isn't the case! and welcome to stack-overflow!)

            – aviya.developer
            Dec 3 '18 at 9:09











          • Thanks, much appreciated.

            – Francois
            Dec 5 '18 at 8:04











          • WORKS! Of course Friday night presented the best opportunity to finally check it haha. Thanks a lot man!

            – aviya.developer
            Dec 14 '18 at 21:05














          4












          4








          4







          So this is basically a bash script that CPanel runs when you update your repo stored on the server. the layout in your case should be:



          Please remove all "# comments" if you are copying the example or it might not work



          ---
          deployment:
          tasks:
          - export DEPLOYPATH=/home/<username>/public_html/<app_folder>
          - /bin/cp <file_name> $DEPLOYPATH #Copy specific file to destination from root
          - /bin/cp /<sub_folder>/<file_name> $DEPLOYPATH #copy specific file from source sub folder
          - /bin cp * $DEPLOYPATH #copy all from root
          - /bin cp /<sub_folder>/* $DEPLOYPATH #copy all from sub folder root



          So the above should work for you.....but.....



          If you are doing the whole root to destination then here is the one I use to just copy all.



          ---
          deployment:
          tasks:
          - export DEPLOYPATH=/home/<user_name>/public_html #Add /<sub_folder> if required
          - /bin/cp -r * $DEPLOYPATH




          • /bin/cp "copy command"

          • -r "recursive include sub folder / files"

          • '*' "all"


          Remember to add /<sub_folder> if you need an app folder other than public_html



          You can get the file from my repo:



          https://github.com/FrancoisGeyser/cPanel-yml.git



          Hope that helps.






          share|improve this answer















          So this is basically a bash script that CPanel runs when you update your repo stored on the server. the layout in your case should be:



          Please remove all "# comments" if you are copying the example or it might not work



          ---
          deployment:
          tasks:
          - export DEPLOYPATH=/home/<username>/public_html/<app_folder>
          - /bin/cp <file_name> $DEPLOYPATH #Copy specific file to destination from root
          - /bin/cp /<sub_folder>/<file_name> $DEPLOYPATH #copy specific file from source sub folder
          - /bin cp * $DEPLOYPATH #copy all from root
          - /bin cp /<sub_folder>/* $DEPLOYPATH #copy all from sub folder root



          So the above should work for you.....but.....



          If you are doing the whole root to destination then here is the one I use to just copy all.



          ---
          deployment:
          tasks:
          - export DEPLOYPATH=/home/<user_name>/public_html #Add /<sub_folder> if required
          - /bin/cp -r * $DEPLOYPATH




          • /bin/cp "copy command"

          • -r "recursive include sub folder / files"

          • '*' "all"


          Remember to add /<sub_folder> if you need an app folder other than public_html



          You can get the file from my repo:



          https://github.com/FrancoisGeyser/cPanel-yml.git



          Hope that helps.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 23 '18 at 5:53

























          answered Nov 23 '18 at 5:35









          FrancoisFrancois

          563




          563













          • Hey Francois, thank you very much for this thorough answer. I just wanted to say that I'm super busy and will only have time to go through this later on. But i will definitely do so and if it work i will be sure to mark it as the answer. For now i upvoted you. (It can just be quite annoying when you give a good answer and go on ignored so I wanted to let you know that this isn't the case! and welcome to stack-overflow!)

            – aviya.developer
            Dec 3 '18 at 9:09











          • Thanks, much appreciated.

            – Francois
            Dec 5 '18 at 8:04











          • WORKS! Of course Friday night presented the best opportunity to finally check it haha. Thanks a lot man!

            – aviya.developer
            Dec 14 '18 at 21:05



















          • Hey Francois, thank you very much for this thorough answer. I just wanted to say that I'm super busy and will only have time to go through this later on. But i will definitely do so and if it work i will be sure to mark it as the answer. For now i upvoted you. (It can just be quite annoying when you give a good answer and go on ignored so I wanted to let you know that this isn't the case! and welcome to stack-overflow!)

            – aviya.developer
            Dec 3 '18 at 9:09











          • Thanks, much appreciated.

            – Francois
            Dec 5 '18 at 8:04











          • WORKS! Of course Friday night presented the best opportunity to finally check it haha. Thanks a lot man!

            – aviya.developer
            Dec 14 '18 at 21:05

















          Hey Francois, thank you very much for this thorough answer. I just wanted to say that I'm super busy and will only have time to go through this later on. But i will definitely do so and if it work i will be sure to mark it as the answer. For now i upvoted you. (It can just be quite annoying when you give a good answer and go on ignored so I wanted to let you know that this isn't the case! and welcome to stack-overflow!)

          – aviya.developer
          Dec 3 '18 at 9:09





          Hey Francois, thank you very much for this thorough answer. I just wanted to say that I'm super busy and will only have time to go through this later on. But i will definitely do so and if it work i will be sure to mark it as the answer. For now i upvoted you. (It can just be quite annoying when you give a good answer and go on ignored so I wanted to let you know that this isn't the case! and welcome to stack-overflow!)

          – aviya.developer
          Dec 3 '18 at 9:09













          Thanks, much appreciated.

          – Francois
          Dec 5 '18 at 8:04





          Thanks, much appreciated.

          – Francois
          Dec 5 '18 at 8:04













          WORKS! Of course Friday night presented the best opportunity to finally check it haha. Thanks a lot man!

          – aviya.developer
          Dec 14 '18 at 21:05





          WORKS! Of course Friday night presented the best opportunity to finally check it haha. Thanks a lot man!

          – aviya.developer
          Dec 14 '18 at 21:05




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52688981%2fissues-with-the-format-of-cpanel-yml-file-when-trying-to-deploy-cpanel-git-repo%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to send String Array data to Server using php in android

          Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

          Is anime1.com a legal site for watching anime?