I can understand your problem as a project (resource) deployment problem.
Static resources
If it’s just some pictures, HTML, js, CSS, etc., feel free to use Git Hook. Here is an introductory article.
Project backend
For example, if you write scripting languages such as PHP, Node.js, Python or Ruby, and include database resources, and want to find a tool in addition to scp to upload source code to the server and deploy and run it, I recommend Capistrano. Here is a deployment article so you can get a feel for it. Now Capistrano has been released to the third edition, which is quite different from the second edition. Capistrano 2
Use Hook. After the git push is completed, the hook is executed and the code is cloned to the server. https://developer.github.com/webhooks/#events
Using Git to deploy a web site notes
Using Git to manage a web site
I can understand your problem as a project (resource) deployment problem.
Static resources
If it’s just some pictures, HTML, js, CSS, etc., feel free to use Git Hook. Here is an introductory article.
Project backend
For example, if you write scripting languages such as PHP, Node.js, Python or Ruby, and include database resources, and want to find a tool in addition to scp to upload source code to the server and deploy and run it, I recommend Capistrano. Here is a deployment article so you can get a feel for it. Now Capistrano has been released to the third edition, which is quite different from the second edition.
Capistrano 2
I usually make the upgrade package through git patch and put it on the update server, and then update it in the background