Plesk

Using remote Git hosting – Enable Additional Deployment Actions

In many cases, file publishing is not enough to finish web site
deployment. For example, if you are using a framework like Ruby on
Rails, you may need to run a data migration task after deployment with a
command like this:  bin/rails db:migrate.

Plesk gives you the ability to define one or more additional commands
that will be run every time the files are deployed to the web site.

Go to Websites & Domains > Git, click Repository Settings,
select Enable additional deploy actions, and type one or more shell
commands that will run every time the repository contents are deployed.
Enter every separate command in a new line.

Note: On Linux, if SSH access is forbidden for the domain’s system user,
all specified commands will run in a chrooted environment. The home
directory of the subscription’s system user is treated as the file
system root for that subscription, and no executable files outside
the chroot jail can be run. For example, if the path to your site is
/var/www/vhosts/example.com/httpdocs, in a chrooted environment,
the path will be ./httpdocs, so you will not be able to execute
commands outside one level above the /httpdocs directory.