Skip to content

Instantly share code, notes, and snippets.

@nihen
Created October 15, 2009 18:12
Show Gist options
  • Save nihen/211153 to your computer and use it in GitHub Desktop.
Save nihen/211153 to your computer and use it in GitHub Desktop.
archer and git
global:
dest_dir: /var/www/example/
work_dir: dummy
assets_path: /path/to/archer_assets/
tasks:
init:
- module: Exec::Local
name: stash save
config:
command: "git stash save"
- module: Exec::Local
name: fetch
config:
command: "git fetch"
- module: Exec::Local
name: changelog
config:
command: "git diff origin/release..origin/master"
- module: Confirm
name: confirm
config:
msg: really deploy? [y/n]
- module: Exec::Local
name: repository release
config:
command: "git checkout release; git merge origin/master; git push"
process:
- module: Exec::Local
name: rsync
config:
user: apache
command: "rsync -auvz '--exclude=.git*' '--exclude=*.swp' -e ssh --delete . [% server %]:[% dest_dir %]"
- module: Exec::Remote
name: apache-restart
config:
command: "sudo /etc/init.d/httpd reload"
finalize:
- module: Exec::Local
name: goto master
config:
command: "git checkout master"
- module: Exec::Local
name: stash pop
config:
command: "git stash pop"
projects:
APP:
server:
- example.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment