Add housekeep task to delete the previous files before deployment.
This commit is contained in:
parent
cc75c68842
commit
b65d5c07bd
11
.drone.yml
11
.drone.yml
|
@ -60,6 +60,17 @@ steps:
|
||||||
- for TARGET in `find public/ -type f | egrep "\.(css|js|png|jpg|JPG|PNG|CSS|JS)$"`; do gzip -c ${TARGET} > ${TARGET}.gz; done
|
- for TARGET in `find public/ -type f | egrep "\.(css|js|png|jpg|JPG|PNG|CSS|JS)$"`; do gzip -c ${TARGET} > ${TARGET}.gz; done
|
||||||
- for TARGET in `find public/ -type f | egrep "\.(css|js|png|jpg|JPG|PNG|CSS|JS)$"`; do rm -f ${TARGET}; done
|
- for TARGET in `find public/ -type f | egrep "\.(css|js|png|jpg|JPG|PNG|CSS|JS)$"`; do rm -f ${TARGET}; done
|
||||||
|
|
||||||
|
- name: housekeep
|
||||||
|
image: appleboy/drone-ssh
|
||||||
|
settings:
|
||||||
|
host: 10.0.1.166
|
||||||
|
username: webadm
|
||||||
|
port: 10022
|
||||||
|
key:
|
||||||
|
from_secret: ssh_key
|
||||||
|
script:
|
||||||
|
- rm -rf /var/www/test/*
|
||||||
|
|
||||||
- name: scp
|
- name: scp
|
||||||
image: appleboy/drone-scp
|
image: appleboy/drone-scp
|
||||||
settings:
|
settings:
|
||||||
|
|
Loading…
Reference in New Issue