Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Ruby Script for deploying from Git via FTP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README
deploy
deploy.yml

README

chmod the deploy script to make it executable and place it wherever you'd like.  I put mine in /usr/bin. 

You'll want to create any tags manually for whatever server groups you set up.  So if the code from "master" is already on both staging and production, run "git tag staging master" and "git tag production master".  This will get those setup for the script to create diffs from later.


Create a file named "deploy.yml" in the root of your project w/ the following sytax.

staging:
  servers: [
  { host: ftp-staging.domain.com, directory: /var/sites/staging/sitefolder }
  ]

production:
  servers: [
  { host: ftp-production.domain.com, directory: /var/sites/sitefolder },
  { host: ftp-production2.domain.com, directory: /var/sites/staging/sitefolder }
  ]


The deploy script uses FTP credentials so if you can FTP to the servers, you can use the script.

As shown above, you may add multiple servers to a group.

Example usage:
deploy production master user pass

This uses a diff from the current "production" tag and "master", FTPs the files up, and recreates the "production" tag.
Something went wrong with that request. Please try again.