• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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