Git is a Version Control System that can be used to track changes in any file and is commonly used to develop software. While it is mainly designed to coordinate work among programmers, it can also be used to track changes in any set of files.
Deployment
If you wish to deploy a Git repository, find your target site in the Websites section and click on Manage next to it.
Then, search for Git on the left sidebar and click on the result:
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)
The install path directory must not contain any files or folders; otherwise, 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 press the Auto-Deployment button:
Webhooks allow you to build or set up integrations that 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 😊
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.