copy old site
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
42033294db
commit
51d1aec9f2
16
.drone.yml
16
.drone.yml
|
@ -34,6 +34,7 @@ steps:
|
|||
from_secret: user
|
||||
SSH_KEY:
|
||||
from_secret: ssh_key
|
||||
|
||||
when:
|
||||
branch:
|
||||
- drone
|
||||
|
@ -52,7 +53,20 @@ steps:
|
|||
- echo "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
|
||||
|
||||
# run operations on remote host
|
||||
- ssh "$${USER}@$${HOST}" "neofetch"
|
||||
- host_dir="/var/www/$${HOST}"
|
||||
- backup_dir="~/backups/$${HOST}/$${HOST}-$${DRONE_STAGE_STARTED}"
|
||||
- make_backup_dir="mkdir -p $backup_dir"
|
||||
- copy_files="rsync -rP $host_dir/* $backup_dir"
|
||||
- host="$${USER}@$${HOST}"
|
||||
|
||||
- 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"
|
||||
|
||||
#- ssh
|
||||
#- ssh "$${USER}@$${HOST}" "[[ ! -d ~/gemini/content ]] || rm -r ~/gemini/content"
|
||||
#- rsync -rP content "$${USER}@$${HOST}:gemini"
|
||||
|
|
Loading…
Reference in New Issue