Skip to content

Instantly share code, notes, and snippets.

@musaulker
musaulker / ex.js
Created September 6, 2010 02:13 — forked from kwhinnery/ex.js
win.addEventListener("android:back", function(e) {
//screw with users expectations here
});

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
<?php
# Automated Deployments from Bitbucket/Github Service Hook
# Graciously borrowed from: http://brandonsummers.name/blog/2012/02/10/using-bitbucket-for-automated-deployments/
date_default_timezone_set('America/Chicago');
class Deploy {
/**
* A callback function to call after the deploy has finished.