J
J
joyd2011-10-25 18:25:14
git
joyd, 2011-10-25 18:25:14

How to properly deploy from GitHub and BitBucket?

We want the team to finally switch to Git or Mercurial. But it is not very clear how to correctly arrange a deployment from repositories on GitHub and BitBucket. Please let me know if anyone has experience!
Thank you!

Answer the question

In order to leave comments, you need to log in

6 answer(s)
L
Leonid Svyatov, 2011-10-27
@joyd

In the project settings on GitHub there is such a thing as Service Hooks (https://github.com/username/project/admin/hooks), there is a “Post-Receive URLs” hook in which you can specify the address to which GitHub will send info about pushes.
Thus, the scheme of work is simple: set up a hook, make a commit, GitHub pulls the ifnu at the address you specified, your script on the server, based on the received information, pulls the code and does everything else that needs to be done for deployment.
We have it :)

@
@mgyk, 2011-10-25
_

capistrano?

D
d4rkr00t, 2011-10-25
@d4rkr00t

It is very convenient to deploy with capistrano, especially if you use database migrations, so we deploy the project on rails.

@
@resurection, 2011-10-25
_

I make a new “Live” branch from which I delete the directories: _backups, _docs, _adminCreator and all /settings/dev-***.cfg files.
It turns out such a “leaky” version that is deployed on a combat server.

A
Andrey Shaydurov, 2011-10-26
@GearHead

deploy from github? How is that?
if I understand you correctly, you need to add one remote to the github repository, and one more to the deployment site. github itself does not support commit hooks, and you cannot directly deploy from it.

E
EvgeniyKirov, 2011-10-26
@EvgeniyKirov

In simple cases Fabric , which does git pull or hg pull -u.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question