daihan.me/.drone.yml
Han Dai 3d56f6e437
All checks were successful
continuous-integration/drone/push Build is passing
update drone ci to compress svg and js files
2020-02-26 11:38:28 -05:00

31 lines
650 B
YAML

kind: pipeline
type: docker
name: default
steps:
- name: compress
image: node
commands:
- npm install uglify-js svgo -g
- for i in js/*.js; do uglifyjs -c -m -o $i -- $i; done
- for i in $(find . -name "*.svg"); do svgo $i -o $i; done
- name: publish
image: appleboy/drone-scp
settings:
host:
- daihan.me
user:
from_secret: user
key:
from_secret: ssh_key
passphrase:
from_secret: passphrase
port: 22
command_timeout: 2m
target:
from_secret: path
source:
- !./.drone.yml
- ./*