Create logs, and destination directories on deploy

This commit is contained in:
0x1eef 2023-02-14 18:09:41 -03:00
parent 13234d34d1
commit 42d803e411
2 changed files with 4 additions and 0 deletions

View file

@ -12,6 +12,9 @@ class Tasks::Deploy::Local
def call
src, dest = settings.src, settings.dest
user, group = settings.user, settings.group
logs_dir = settings.logs_dir
doas "root", "/bin/mkdir", "-p", logs_dir
doas "root", "/bin/mkdir", "-p", dest
doas "root", "/bin/rm", "-rf", File.join(dest, "*")
doas "root", "/bin/cp", "-r", src, dest
doas "root", "/usr/sbin/chown", "-R", [user, group].join(":"), dest

View file

@ -25,3 +25,4 @@ deploy:
group: www
src: build/al-quran/.
dest: /var/www/htdocs/al-quran.reflectslight.local/
logs_dir: /var/www/logs/al-quran.reflectslight.local/