Pergunta

I am developing a WordPress theme which is under version control using Git and in a local development area ( WAMP ). I push commits to Bitbucket using smartgit as a GUI. I have 2 branches, master and development. I want to deploy the development branch to a staging area (a WordPress install on my live server).

I have tried using ftploy which does achieve this; however it doesn't seem to allow me to choose which branch to deploy and I want to reserve deployment of the master branch for the actual final deployment. I am using shared hosting but I have SSH access.

How can I best achieve deployment of the development branch to the shared hosting? Git is not installed on the server (and can't be).

Foi útil?

Solução

There is an article that suggest 7 apps for Git auto-deploy:

Outras dicas

have a look at git-ftp:

I use git-ftp for my script based projects, mostly PHP. Most of the low-cost web hosting companies do not provide SSH or git support, but only FTP.

That is why I needed an easy way to deploy my git tracked projects. Instead of transfering the whole project, I thought, why not only transfer the files that changed since the last time, git can tell me those files.

Even if you are playing with different branches, git-ftp knows which files are different. No ordinary FTP client can do that.

I'm the founder of FTPloy and I just wanted to let you know that we've now released the branch selection functionality.

Ended up using this script which does exactly what I want. Actually it was written by the same guy who built ftploy but because I had access to the script I was able to determine which branch got deployed. By the way I discovered that the ftploy roadmap includes being able to Select Branch for Bitbucket projects.

Since you have SSH access, it would seem to me you could set up a rsync command in the git post-receive hook script. See https://github.com/EugeneKay/scripts/blob/master/bash/git-deploy-hook.sh I used this with gitolite but I am sure it is possible to do something similar with a github hook as well (anyone?)

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top