From 32e0b589e1c9b0f4e27bfa68218161b1ddbab841 Mon Sep 17 00:00:00 2001 From: Melkor Date: Sun, 7 Jul 2024 18:01:55 -0400 Subject: [PATCH] Added compression step to deploy. --- .forgejo/workflows/deploy.yaml | 5 +++++ package.json | 3 +++ 2 files changed, 8 insertions(+) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index 1688ea0..0e095a4 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -36,6 +36,11 @@ jobs: echo "Compiling hugo site." ssh -p 42042 -o StrictHostKeyChecking=no melkor@barad-dur "cd /srv/sites/anubis.mgk.one/git && npm run build" + - name: Compressing hugo site + run: | + echo "Compressing hugo site." + ssh -p 42042 -o StrictHostKeyChecking=no melkor@barad-dur "find /srv/sites/anubis.mgk.one/git -type f \( -name '*.html' -o -name '*.js' -o -name '*.json' -o -name '*.xml' -o -name '*.css' \) -exec brotli -v -k -f --best {} \;" + - name: Using rsync to copy over the new website from the webserver's git repo run: | echo "Using rsync to copy over the new website from the webserver's git repo." diff --git a/package.json b/package.json index af042cb..139d093 100644 --- a/package.json +++ b/package.json @@ -29,5 +29,8 @@ "prettier-plugin-tailwindcss": "^0.5.14", "tailwind-bootstrap-grid": "^5.1.0", "tailwindcss": "^3.4.3" + }, + "dependencies": { + "hugo-extended": "^0.128.0" } }