The webhook feature to automatically update the repository attached to a site works, but the deployment commands set are not executed, although they are activated and it is recommended to execute them after each pull operation triggered by webhook.
I found the problem. The commands should be executed from the ROOT folder in the repository. This doesn’t happen and it complicates things a lot, can you make the folder from which the commands are run to be the root of the repository?
Check out this error generated by composer install command
INFO 06.12.2020_09-04-01 Result: [RuntimeException] The HOME or COMPOSER_HOME environment variable must be set for composer to run correctly
INFO 06.12.2020_09-04-00 Running: /usr/local/lsws/lsphp74/bin/php /usr/bin/composer install --prefer-dist -n -o -d ~/public_html/
The command is correct because, form console, using su - user to impersonate che website user, the command successfully install composer dependancies without errors, bot for some reason, from post-webhook commands doesn’t work