From 4bedec7c2fbec79e51c3ec73abbefd64087a3cfe Mon Sep 17 00:00:00 2001 From: Brooke Date: Thu, 14 Mar 2024 17:59:31 -0400 Subject: [PATCH] test minify --- .gitea/workflows/deploy.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 780859f..69d79ef 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -10,11 +10,17 @@ jobs: steps: - uses: actions/checkout@v3 with: - submodules: 'recursive' + submodules: 'recursive' - name: Grab packages run: | apt-get update && \ - apt-get install --no-install-recommends --no-install-suggests -y jq rsync + apt-get install --no-install-recommends --no-install-suggests -y jq rsync && \ + npm install -g uglify-js && \ + npm install -g html-minifier + - name: Minify HTML + run: html-minifier --input-dir . --output-dir . --file-ext html --collapse-whitespace --remove-comments --remove-optional-tags index.html + - name: Minify CSS & JS + run: uglifyjs script.js -o script.min.js && uglifyjs style.css -o style.min.css - name: Test static page run: bash ${{ gitea.workspace }}/bin/test_static_page.sh - name: Deploy to Server