Add compress step to Drone

This commit is contained in:
BBaoVanC 2021-05-29 18:30:03 -05:00
parent fb814417ea
commit 996955eb46
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
2 changed files with 9 additions and 0 deletions

View File

@ -22,6 +22,11 @@ steps:
- hugo version
- hugo --minify
- name: compress
image: alpine:latest
commands:
- ./compress.sh
- name: upload
image: appleboy/drone-scp
settings:

4
compress.sh Executable file
View File

@ -0,0 +1,4 @@
for f in $(find public/ -name "*.html" -o -name "*.xml" -o -name "*.css" -o -name "*.js"); do
echo "Compressing $f..."
gzip -nk $f
done