Fix deploy task

This commit is contained in:
0x1eef 2023-07-12 21:31:54 -03:00
parent 7c8134cd05
commit a088a9ec51
2 changed files with 7 additions and 4 deletions

View file

@ -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

View file

@ -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