How to deploy a server script?

What is the easiest way to deploy from GitHub to a web server?

  • With Beanstalk I can easily deploy S/FTP, which is handy since I can avoid having a .git folder in my web root and don't have to mess with setting up post hooks, installing git on the server, etc. How can I easily deploy files to my web server when using GitHub instead of Beanstalk (preferably without an added cost over the GitHub fee)?

  • Answer:

    Check out Dandelion (https://github.com/scttnlsn/dandelion) for deploying Git repositories via FTP/SFTP.  I use it to deploy web applications to servers for which I do not have shell access.

Scott Nelson at Quora Visit the source

Was this solution helpful to you?

Other answers

Two possibilities come to mind. 1) You have a third service sitting in between GitHub and your server that clones your repository and deploys (can also test) to any of your servers. This is helpful when you deploy to multiple servers or have some more complicated steps involved. You separate the concerns which makes maintenance easier.   You can use a self-hosted or SaaS solution for that. Jenkins would come to mind as a great self-hosted solution, Hosted solutions would be: https://www.codeship.com (which I am a founder of) http://www.deployhq.com/ http://www.cloudbees.com/ https://semaphoreapp.com/ https://circleci.com/ 2) You use the github webhook capabilities to call a specific url which triggers a deployment inside this server. Depending on the technology you use there are various possibilities  This is a little security by obscurity, but can be done in a way that is still secure and works great for a small number of servers. In the script just clone the repository and either use symlinks to change the code that should be used (PHP) or reconfigure and restart the server that sits in front of your application server (Nginx & Ruby for example)

Florian Motlik

I'm the founder of https://commando.io and recently we announced an integration with GitHub via a service.  The integration allows you to run executions on servers when you push to a GitHub repo. This is a perfect opportunity to automatically run deployment scripts when you push code. An execution is a script you write inside of Commando.io that can be written in bash, perl, python, ruby, go, or node.js. To read more, and see an example execution script of running `git pull`, see our blog post announcement: http://blog.commando.io/run-executions-via-github-push/

Justin Keller

Hi, I'm one of the Beanstalk developers. Recently we launched a new service providing our deployment tools to GitHub, BitBucket and self-hosted repositories - check out http://deploybot.com

Eugene Fedorenko

I’ve written a little PHP script that helps with FTP deployments. It is called PHPloy and is tightly-coupled with Git to determine what which files where edited/added/deleted and uploads them accordingly. You put your FTP details in a deploy.ini file and run just a command to deploy:     phploy You can also deploy to multiple servers at once. And if you have multiple servers configured, you can select to deploy to one of them like this:     phploy --server staging There is more that can be done – check it out on Github: https://github.com/banago/PHPloy

Baki Goxhaj

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.