I do a lot of coding for my blog and occasionally friends blogs/side-projects, and have been looking at possible ways to manage deployment simply, as while I version control all my code, copying it up to the server using SFTP can be troublesome, time-consuming and error prone.
I currently have no automated easy way to do this and wondered what else people might use, so thought I would shout out on twitter to see what others do.
The variety of responses was amazing, so thought I'd do a little round up and list them all, do a little searching and provide some useful URLs.
Suggestions from Twitter
Capistrano (4 mentions)
What is it: Ruby tool intended originally for ruby/rails, but can be used for anything.
%blockquote Fabric is a Python (2.5 or higher) library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks.
It provides a basic suite of operations for executing local or remote shell commands (normally or via sudo) and uploading/downloading files, as well as auxiliary functionality such as prompting the running user for input, or aborting execution.
Typical use involves creating a Python module containing one or more functions, then executing them via the fab command-line tool.
What is it: Codebase looks to be a pretty kickass code management platform. Deploy is a deployment platform for Git Mercurial and SVN that deploys to the cloud/FTP/SSH/SFTP. A deploy membership seems to come with Codebase, but it can be used as a standalone product. There arepricing plans, but looks like you can do a single project with up to 10 deployments a day for free.
What is it: 'Hassle-free, hosted version control service' - a version control service that has some really nice looking integration and deployment features baked in. Commercial, but has a free 30 day trial (http://beanstalkapp.com/pricing)
Ideally free - have no money to fund an ongoing service as it's for a personal project with infrequent deployments rather than a project with regular use.
Version control not needed - I already have version control covered
Simple - I LOVE simple.
Chef/Puppet look a bit too heavyweight for my needs, as I don't need to deploy VMs, just small amounts of code.
Git Hooks look great, but I don't want to put a publicly accessible deploy script on my web server. Codebase/deployhq and beanstalk app look amazing, but I have my VCS already sorted, and as I use bitbucket, CircleCI is out. Fabric looks good, but I don't really use Python, which for me is yet another language to learn.
While I haven't settled on a fully automated solution quite yet, in the end after playing around with Capistrano and failing (more likely my understanding than Capistrano's fault) I got a solution working using SSH + Git, taken from the plain Git approach from Chris James, which involved creating a SSH user on my web server, and authenticating this with my VCS.
Basically I have to:
SSH onto my web server
Do a 'git pull' command to get the latest version via SSH.
Not particularly automated, but at lease I know my live site is version controlled and easily updated.
For the future, I'm looking into both Grunt+Plugins and Capistrano, as they seem to fit the bill closest, and I like the idea of keeping my server completely clean. Of interest was a very detailed overview from David Tucker on how he uses Grunt for automation. I'm also looking into deployHQ as a possible product to use, as a third possible solution, as that seems pretty pain free, and is pretty much a third party extension of what I went with.
Thanks for reading this far - if there are an inaccuracies/suggestions for this listdo let me know.
This stuff is hard - while saving you time on the long run, some of the setup can be quite confusing, and I did hit a fair few brick walls while trying stuff. I don't think there is one true right way - all the methods listed above look great, and could be valid for your given situation, depending on what language you are familiar with, what you are deploying to where, and what your needs are.
While I think everyone should look into version controlling code for their blogs/websites (github is free for open repos, bitbucket free for open/private repos), if you are a developer or just like to tinker with code, there is no reason you shouldn't try automating site deployments - why repeat boring tasks when a computer can do them for you?
Thanks to all those who responded to my tweet - Happy new year and happy coding in 2014!