Using shell script to deploy automatically

Automatic deployment is essential for any project which is supposed to be worked on and run continuously. Until recently I was using capistrano to do this, but since development seems to have kind of stalled recently I decided to look around for an alternative, which I found in deploy a shell script by TJ Holowaychuk. To check it out I am currently using it to deploy a small Codeignitor project I am working on the side and use to try out new stuff. It really is easy to use and quite flexible due to allowing pre and post deploy hooks as well as automatic tests to check if the deployed version is working, and rollback if it is not. The use with CI is quite simple the only thing todo is to make sure that the right permissions are set which can be easily handled by a post-deploy shell script.


On the server it creates a simple directory structure with


in my case for both staging and production. This is done via an initial

deploy [ENV] setup

all following deploys are done by issueing

deploy [ENV]

deploy shell script


For some reason some commands were not working for me in Bash ond my Mac so I had to do some small ajustments, I guess it is due to the version of bash I am using being not current maybe. You can find them in my fork

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.