Fix deploy task
This commit is contained in:
parent
7c8134cd05
commit
a088a9ec51
2 changed files with 7 additions and 4 deletions
|
@ -3,6 +3,7 @@
|
|||
require "bundler/setup"
|
||||
require "ryo"
|
||||
require "yaml"
|
||||
load "tasks/deploy.rake"
|
||||
|
||||
build_dir = Ryo.from(YAML.load_file("./nanoc.yaml")).output_dir
|
||||
|
||||
|
|
|
@ -39,18 +39,20 @@ task "deploy:local" do
|
|||
sh "chmod -R u+rwX #{dest_dir}"
|
||||
end
|
||||
|
||||
task "deploy:remote" do
|
||||
task "deploy:remote" => %i[nanoc:clean] do
|
||||
git_branch = `git branch --show-current`.chomp
|
||||
options = read_options.call(env: "remote")
|
||||
if git_branch != "production"
|
||||
warn "This task can only be run on the 'production' branch."
|
||||
exit(1)
|
||||
end
|
||||
print "Wait...", "\n"
|
||||
sh(
|
||||
"rsync", "--delete", "-rvah",
|
||||
"rsync",
|
||||
"--delete", "-rvah",
|
||||
"--chmod=Fu=rw,Fg=r,Du=rwx,Dg=rx",
|
||||
"--rsync-path='/home/0x1eef/rsync.sh'",
|
||||
"build/al-quran", options.deploy.uri
|
||||
"--exclude=audio/",
|
||||
"build/al-quran/",
|
||||
"0x1eef@al-quran.reflectslight.io:/mnt/www/al-quran.reflectslight.io/"
|
||||
)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue