GIT Repository
So I have a private Github that I've susscesfully setup SSH access connection between cPanel and GIT. However I'm having an issue where anytime I go to deploy head commit it just sits at "The deployment that you triggered on Feb 24, 2021 TIME is queued ""
Sometimes it seems to work, most of the time it just hangs. So I'm guessing something isn't setup correctly. So I suppose a few questions;
1) Is there a way to set cpanel to automatically pull the changes on GIT and pull down to the server? It seems that's suppose to be a function but I guess I'm missing how to set it up?
2) How do I view the logs of the git attempts in order to troubleshoot why its hanging
3) For some reason it's deploying to a subdirectory
The cpanel yml file is as follows;
| # --- | |
| # deployment: | |
| # tasks: | |
| # - export DEPLOYPATH=/home/CPANELUSER/public_html/ | |
| # - /bin/cp -R /home/CPANELUSER/repositories/GITNAME $DEPLOYPATH |
-
Hey there! Can you check the following logs to see if those give any additional details on the situation? - /usr/local/cpanel/logs/error_log " Errors and stack traces.
- /home/username/.cpanel/logs/user_task_runner.log " Queue-related items.
- /home/username/.cpanel/logs/vc_TIMESTAMP_git_create.log " Creation-related issues, where TIMESTAMP represents the time of the operation.
- /home/username/.cpanel/logs/vc_TIMESTAMP_git_deploy.log " Deployment-related issues, where TIMESTAMP represents the time of the operation.
0 -
Hey there! Can you check the following logs to see if those give any additional details on the situation?
- /usr/local/cpanel/logs/error_log " Errors and stack traces.
- /home/username/.cpanel/logs/user_task_runner.log " Queue-related items.
- /home/username/.cpanel/logs/vc_TIMESTAMP_git_create.log " Creation-related issues, where TIMESTAMP represents the time of the operation.
- /home/username/.cpanel/logs/vc_TIMESTAMP_git_deploy.log " Deployment-related issues, where TIMESTAMP represents the time of the operation.
0 -
So I was able to get the GIT to pull successfully, one question how would I specify that instead of pulling the full GIT repository it just pulls the "public" folder from that GIT? So the issue we're having is that its pulling all the build files plus the public folder. Where as the contents of the public folder on GIT are the only things that need to be pulled into public_html --- deployment: tasks: - export DEPLOYPATH=/home/cpaneluser/public_html/ - /bin/cp -R public $DEPLOYPATH
So I'm a bit confused as to what I would modify to only pull say /NAMEOFREPOSITORY/public where as right now its pulling the full repository Ive got it to just pull the public folder, but I want that folders content deployed into public_html0 -
Figured it out, needed to set it to - /bin/cp -R public/* $DEPLOYPATH So the last part I'm confused about, is how do I get cPanel to auto pull anytime there's a committed revision to GitHub? 0 -
I'm not aware of a way to do that where the cPanel side "senses" there has been a commit. You could set up a cron job to pull the changes down at regular intervals, but that's all I can think of for that situation. 0
Please sign in to leave a comment.
Comments
6 comments