Script de deploy (#3)

Reviewed-on: https://codeberg.org/LuckyMeowth/luckymeowth/pulls/3
Co-authored-by: Felipe Contreras Salinas <felipe@bstr.cl>
Co-committed-by: Felipe Contreras Salinas <felipe@bstr.cl>
This commit is contained in:
Felipe 2025-01-04 01:45:45 +00:00 committed by Felipe Contreras Salinas
parent a5b1114f2e
commit b5ada8142e

23
deploy Executable file
View file

@ -0,0 +1,23 @@
#!/bin/zsh
set -e
set -x
USER=lucky
HOST=luckymeowth.gg
DIR=www # might sometimes be empty!
zola build
pushd public
rg -l -t html "\\$" | xargs deno run --allow-read --allow-write ../themes/lucky/scripts/katexRender.ts
rg -l -t html "ptcg" | xargs deno run --allow-read --allow-write ../themes/lucky/scripts/ptcgIcons.ts
fd -e html -x minify-html --keep-html-and-head-opening-tags --do-not-minify-doctype --minify-js -o {} {}
fd -e xml -x minify-html -o {} {}
fd -e css -x minify-html -o {} {}
fd -e js -x minify-js -m global -o {} {}
popd
rsync -O -avzz --no-p --no-g --chmod=ugo=rwX public/ ${USER}@${HOST}:~/${DIR}
rm -rf public/
exit 0