Autodeployment using GitLab Webhooks

GitLab Webhooks GitLab provides various Webhooks to perform automated tasks after a certain event. For e.g. Push events Gitlab webhooks will work exactly similar to post-receive hook in GIT. Only thing is it needs a webpage (mostly on your server) which gets executed after a certain commit is made to the GitLab repository. This webpage can perform tasks like updating the local mirror repository and making the corresponding change in the files in your public_html folder. Read more about webhooks in GitLab Assuming you have a GitLab repository at: git@gitlab.com:username/some_project.git Steps to follow on your production/live server SSH to your production/live server Generate an SSH key for auto deployment to be used by the GitLab server [crayon-59c1005957c4a686401486/] Name of the key: gitlab_rsa_deploy, keep the passphrase blank Add the contents of the gitlab_rsa_deploy.pub key to Deyloy Keys section of your Project Settings and Enable it Create a config file in .ssh folder and add below contents to the file. Add your user key added to GitLab user key settings. [crayon-59c1005957c57120791454/] Create...
Read More