From 3d56f6e4373c2a9f505ee01027dc6ac6ecdf0d7b Mon Sep 17 00:00:00 2001 From: Han Dai <10000@daihan.me> Date: Wed, 26 Feb 2020 11:38:28 -0500 Subject: [PATCH] update drone ci to compress svg and js files --- .drone.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index af0f56f..6320064 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,6 +3,13 @@ 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: @@ -20,4 +27,4 @@ steps: from_secret: path source: - !./.drone.yml - - ./* \ No newline at end of file + - ./*