Git is a Version Control System, which can be used to track changes in any files, but it is commonly used to develop software. It is designed for coordinating work among programmers, but it can be used to track changes in any set of files.
Deployment
If you wish to deploy a Git repository, you can simply do that by opening Websites → Manage, searching for Git on the left sidebar, and clicking on it:
In the Create a New Repository field, you can set up your deployment settings:
Make sure you select the correct Repository Address and Branch, or the deployment will fail
Leave the Install Path empty, and your website will be deployed to your account's root folder (/public_html)
NOTE:
The install path directory must not contain any files or folders, otherwise, the deployment will fail
Once you add a New Repository to the account, you will be presented with four buttons:
Deploys your already created repository.
Allows you to continuously and automatically deploy your projects each time you push new commits to your repository.
Shows the latest build output.
Deletes the selected repository.
How to use a Webhook URL
You can use the Webhook URL for Auto Deployment to merge a selected Git branch. You will be given a Webhook URL once you will press the Auto-Deployment button.
Webhooks allow you to build or set up integrations, which subscribe to certain events on GitHub. When one of those events is triggered, the scenario will start. Webhooks can be used to update an external issue tracker, update a backup mirror, or even deploy to your production server. You're only limited by your imagination 😊
NOTES:
During the setup, you will be given external links on how to create a Webhook URL. This feature is very useful, for example, if a
composer.json
file exists,composer update
will run automatically as well