• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue GitHub integration: Additional Deployment Actions don't work

Fabs87

New Pleskian
Hey,

I want to add Git to my current project. I managed to connect via ssh to my private repository. Also a webhook fires everytime, I make a push to my repository.

Unfortunately the additional deployment actions seem not to work. SSH is enabled for the domain user and all of the listed command work in my terminal.
  • /opt/plesk/php/7.0/bin/php artisan down
  • composer install --ignore-platform-reqs
  • /opt/plesk/php/7.0/bin/php artisan optimize
  • /opt/plesk/php/7.0/bin/php artisan migrate
  • npm install
  • npm update
  • /opt/plesk/php/7.0/bin/php artisan up
Any idea what I can do? Is there a log-file, where I can search for errors?

Thanks!
 
I'm having the same issue here - all the deployment is working perfectly and the system user also has ssh enabled.

Trying to run an API documentor script to auto update the documentation which is in /usr/local/bin

Any help greatly appreciated!
 
I also had the same issues and finally managed to crack it last night.

In my instance I'm managing a Drupal 8 website and needed to use composer and drush to update libraries and configuration after a deployment.

The first thing I figured out is the directory you start in is your deployment directory i.e. httpdocs and not the home directory of the user - which is where you end up when you ssh in.

The second thing is that all the normal profiles that get applied when you ssh in do not appear to get applied. For me this meant I was forced to use the system version of PHP which is 5.4.16. My website requires PHP 7+ so composer was failing. Drush was also failing as, most likely due to profiles not being setup, I couldn't execute global commands from /usr/local/bin. - I believe Plesk is working on getting global commands running in a future update.

To resolve the PHP issue I updated the path at the top of my .sh file:
export PATH=/opt/plesk/php/7.2/bin:$PATH:$HOME/bin

To resolve the drush issue I used the absolute path:
/usr/local/bin/drush

Although your sh script can be anywhere I stored mine under ~/git/{domain_user}.git/hooks/post_update - I also used absolute paths in the deployment section of the Plesk control panel just in case they change something at some point as to where ~ points you to.

With no logs it is hard to reach this point. To get around that, once I realized something was actually happening i.e. echo test > debug.log (this appears in the httpdocs directory), I then worked on outputting the results of each command to a log file i.e. composer install &> debug.log - from there you just need to view the output of the log file (cat debug.log) and you can now see what is working or failing and fix it accordingly.

Hopefully this helps you out if you've not resolve it yet.

Let me know if you have any questions.
 
Back
Top