copy new site to host
continuous-integration/drone/push Build is passing Details

This commit is contained in:
ktyl 2022-09-28 00:23:45 +01:00
parent 51d1aec9f2
commit c335d38ee8
1 changed files with 2 additions and 9 deletions

View File

@ -13,9 +13,6 @@ steps:
image: archlinux
environment:
PYTHON_ENV: python python-pipenv python-setuptools
when:
branch:
- drone
commands:
# set up python
@ -52,7 +49,7 @@ steps:
- ssh-add
- echo "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
# run operations on remote host
# copy old site
- host_dir="/var/www/$${HOST}"
- backup_dir="~/backups/$${HOST}/$${HOST}-$${DRONE_STAGE_STARTED}"
- make_backup_dir="mkdir -p $backup_dir"
@ -61,11 +58,7 @@ steps:
- ssh $host $make_backup_dir
- ssh $host $copy_files
#- ssh $host 'echo "$host_dir -> $backup_dir"'
#- ssh $host "mkdir -p $backup_dir"
#- ssh $host "rsync -rP /var/www/${HOST}/* ${DRONE_STAGE_STARTED}"
#- ssh $host "ls site"
- rsync -rP site "$host:$${HOST}-new"
#- ssh
#- ssh "$${USER}@$${HOST}" "[[ ! -d ~/gemini/content ]] || rm -r ~/gemini/content"