Skip to content

Instantly share code, notes, and snippets.

@alexblackie
Created January 31, 2013 09:39

Revisions

  1. alexblackie created this gist Jan 31, 2013.
    17 changes: 17 additions & 0 deletions post-receive.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    #!/bin/sh

    # Simply point your virtualhost to the GIT_WORK_TREE below, with "/build" appended. (ex: /path/to/webroot/example.com/build)
    # This is how I manage all of my sites. I highly recommend this setup.

    GIT_WORK_TREE=/path/to/webroot/example.com # Set this to your webroot path (sans build)
    export GIT_WORK_TREE
    git checkout -f

    # Enter Directory
    cd $GIT_WORK_TREE

    # Install Gems
    bundle install

    # Build Middleman
    bundle exec middleman build