Created
October 15, 2009 18:12
-
-
Save nihen/211153 to your computer and use it in GitHub Desktop.
archer and git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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