Automating Git with Git Configure and WebHooks

< All Topics

CyberPanel is introducing Git Manager in version 2.0.0 so now you can easily track files using Git which includes your website data, databases or even emails with your public or private repository at any Git supported server.

This makes it so you can directly sync your development platform to your web server.

In order to set up Git Manager, follow this tutorial: How to use Git Manager in CyberPanel

In this tutorial, we assume that you have set up Git and now you wish to automate the workflow

To automate workflow, go to “Manager Git” option in your website’s management panel

Screenshot 1

In order to configure the automation click on “Configure Git”

Screenshot 34

In the new pop-up, select how often you would like the push and pull to happen

Screenshot 40

Webhook setup

Git Manager provides you with an option to automatically pull from the repository whenever there is change.

In order to configure it, copy the Webhook URL as shown


Screenshot 36

Go to you repository page on Github or GitLab and click on Settings

Screenshot 37


Go to Webhooks from the menu

Screenshot 38

Click on “Add webhook”

Screenshot 39

On the next page enter the following

Payload URL: The link you copied from Git ConfigureĀ  on your own server

Application Type: application/json

Secret: Leave it empty

SSL Verification: Enable it only if you have SSL on your hostname and its properly working

Event: Just push event

Tick the box next to Active

Screenshot 41

Click the Add webhook button.

Post- Pull/Commit Command

You might want to run additional commands after the webhook is triggered and new changes are pulled, you can enter multiple commands on each line. This can be highly beneficial in order to build or optimize your application before publishing it

Screenshot 42

Congratulations, you have successfully automated git workflow

Previous 7 – Cron Jobs
Next Change/Transfer Website Ownership
Table of Contents