1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-23 21:02:09 +00:00

CI: Only gzip when deploying to seirdy.one

Only seirdy.one uses gzip_static
This commit is contained in:
rohan kumar 2020-11-25 21:58:08 -08:00
parent 3474c2d5f4
commit 970fa0e057
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479

View file

@ -22,9 +22,17 @@ case "$1" in
;; ;;
esac esac
find public -type f -name '*.html' -o -name '*.css' -o -name '*.xml' -o -name '*.txt' \ # I use gzip_static with nginx
if [ "$1" = 'seirdy.one' ]; then
find public -type f -name '*.html' -o -name '*.css' -o -name '*.xml' -o -name '*.txt' \
| grep -v gemini \ | grep -v gemini \
| xargs zopfli | xargs zopfli
rsync -avzP --exclude 'gemini' --exclude '*.gmi' --exclude 'misc/' --exclude 'music.txt' --exclude '.well-known' public/ "$www_prefix/" --delete fi
rsync -avzP --exclude '*.html' --exclude 'misc/' --exclude 'music.txt' public/gemini/ public/about public/posts "$gemini_prefix/" --delete
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" rsync -avzP public/posts/gemini.xml "$gemini_prefix/feed.xml"