Skip to content

Instantly share code, notes, and snippets.

@chales
Created January 28, 2014 14:45
Show Gist options
  • Save chales/8668897 to your computer and use it in GitHub Desktop.
Save chales/8668897 to your computer and use it in GitHub Desktop.
Cron job to run a simple deploy via git pull, drush fra, and recompiling sass. Good for some dev/staging setups but not for production. Makes assumptions that no files have been modified on the site.
# Git Pull and Drush Feature revert all
* * * * * cd /var/www/example.com && /usr/bin/git pull --rebase > /var/www/example.com/deploy.log; /usr/bin/drush -y fra > /var/www/example.com/deploy.log 2>&1
# Recompile Sass
* * * * * /bin/bash -c ". /home/webadmin/.bash_profile > /var/www/example.com/deploy.log 2>&1; cd /var/www/example.com/docroot/sites/all/themes/custom/example && /home/webadmin/.rvm/gems/ruby-2.1.0/bin/bundle exec compass compile > /var/www/example.com/deploy.log 2>&1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment