Deploy blog site to the staging environment:

```
--- a/tasks/deploy.rake
+++ b/tasks/deploy.rake
@@ -12,8 +12,6 @@ task :deploy => [:build] do
     end
   end

-  sh 'rsync -e "ssh -p 10022" -az --delete public webadm@10.0.1.234:~/works'
-
-  sh 'ssh -p 10022 webadm@10.0.1.234 "rm -rf /var/www/blog/*"'
-  sh 'ssh -p 10022 webadm@10.0.1.234 "cp -pr ~/works/public/* /var/www/blog/"'
+  sh 'ssh -p 10022 webadm@10.0.1.234 "rm -rf /var/www/test/*"'
+  sh 'rsync -e "ssh -p 10022" -rltvz --omit-dir-times --delete public/ webadm@10.0.1.234:/var/www/test'
 end
```
This commit is contained in:
Kazuhiro MUSASHI 2019-05-06 11:08:06 +08:00
parent 531736357b
commit 71876190b9
1 changed files with 2 additions and 4 deletions

View File

@ -12,8 +12,6 @@ task :deploy => [:build] do
end
end
sh 'rsync -e "ssh -p 10022" -az --delete public webadm@10.0.1.234:~/works'
sh 'ssh -p 10022 webadm@10.0.1.234 "rm -rf /var/www/blog/*"'
sh 'ssh -p 10022 webadm@10.0.1.234 "cp -pr ~/works/public/* /var/www/blog/"'
sh 'ssh -p 10022 webadm@10.0.1.234 "rm -rf /var/www/test/*"'
sh 'rsync -e "ssh -p 10022" -rltvz --omit-dir-times --delete public/ webadm@10.0.1.234:/var/www/test'
end