Created
August 11, 2014 16:37
-
-
Save Shane24/eac116559ffb65320011 to your computer and use it in GitHub Desktop.
Jekyll rakefile
This file contains hidden or 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
| desc "deploy to staging" | |
| task :staging do | |
| local_dir = "./_site/" | |
| remote_dir = "/home/projectname/htdocs/" | |
| host = "1.2.3.4" | |
| ssh_user = "user" | |
| system "find #{local_dir} -type f -exec chmod 0644 {} +" | |
| system "find #{local_dir} -type d -exec chmod 0755 {} +" | |
| system "rsync -avz --delete -e 'ssh' #{local_dir} #{ssh_user}@#{host}:#{remote_dir}" | |
| end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment