How can i update my live server with the changes i made through Git/Bitbucket?
Is there any free service ?
Is it possible to do it with some kind of API which can be integrated with cronjob?
How can i update my live server with the changes i made through Git/Bitbucket?
Is there any free service ?
Is it possible to do it with some kind of API which can be integrated with cronjob?
You could use the BitBucket service hooks.
They are illustrated in "Using Bitbucket for Automated Deployments", and that article uses the POST service.
Bitbucket POSTs to the service URL you specify.
The service receives anPOST
whenever user pushes to the repository.
The content header of thePOST
has anapplication/x-www-form-urlencoded
type.
This services behaves similarly to an HTTP publish/subscribe service.
The payload haspayload=
prepended to the actual payload. The payload is url encode content.The body of POST request contains information about the repository where the change originated, a list of recent commits, and the user that made the push.
Regarding GitHub, see this process which describes how to use the Post-receive hook