Answer the question
In order to leave comments, you need to log in
Auto-deploy with Git - how can it be implemented?
Hello!
There is a production server and a local one - development. Now there is a local git repository (but transfer to somewhere else is possible). The task is to automatically deploy a site from a git repository. Those. i do a commit & push to the repository and those changes appear on the server.
How can such a thing be implemented? Thanks in advance for the replies.
Answer the question
In order to leave comments, you need to log in
The easiest and fastest way to set up: toroid.org/ams/git-website-howto
You need to use git-hooks . On the corresponding event, you can:
- Run a script that will execute deploy via ssh.
- Send a special request to the server that will initialize deploy.
I use a repository on BitBucket and deploy using Jenkins.
BitBucket pulls CI after the push, which updates the local copy and deploys it to the test server.
Using a CI server such as Hudson or TeamCity.
They monitor changes in the repository and, when they appear, download the code, and then perform the assigned actions: for example, deploy via ssh.
My example with gitolite and post-receive hook https://intsystem.org/server/gitolite-avtodeploj-d...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question