From 09d7d6c3fc92c0206a9cb3fd4b825666426d1efd Mon Sep 17 00:00:00 2001 From: rohan kumar Date: Tue, 24 Nov 2020 21:57:20 -0800 Subject: [PATCH] Try out gzip_static I hope this works --- .build.yml | 1 + deploy.sh | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.build.yml b/.build.yml index a726611..2c67975 100644 --- a/.build.yml +++ b/.build.yml @@ -3,6 +3,7 @@ image: alpine/edge packages: - rsync - hugo + - zopfli sources: - https://git.sr.ht/~seirdy/seirdy.one secrets: diff --git a/deploy.sh b/deploy.sh index cb9627b..4504b83 100755 --- a/deploy.sh +++ b/deploy.sh @@ -22,6 +22,9 @@ case "$1" in ;; esac +find public -type f -name '*.html' -o -name '*.css' -o -name '*.xml' -o -name '*.txt' \ + | grep -v gemini \ + | xargs -L1 zopfli rsync -avzP --exclude 'gemini' --exclude '*.gmi' --exclude 'misc/' --exclude 'music.txt' --exclude '.well-known' public/ "$www_prefix/" --delete rsync -avzP --exclude '*.html' --exclude 'misc/' --exclude 'music.txt' public/gemini/ public/about public/posts "$gemini_prefix/" --delete rsync -avzP public/posts/gemini.xml "$gemini_prefix/feed.xml"