From b5ada8142e2cadc3c8b69b08abee01438d3d7dcc Mon Sep 17 00:00:00 2001 From: Felipe Contreras Salinas Date: Sat, 4 Jan 2025 01:45:45 +0000 Subject: [PATCH] Script de deploy (#3) Reviewed-on: https://codeberg.org/LuckyMeowth/luckymeowth/pulls/3 Co-authored-by: Felipe Contreras Salinas Co-committed-by: Felipe Contreras Salinas --- deploy | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 deploy diff --git a/deploy b/deploy new file mode 100755 index 0000000..ca147e5 --- /dev/null +++ b/deploy @@ -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