diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 1631735..76b31ec 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -15,12 +15,9 @@ jobs: run: | apt-get update && \ 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: cd public/ && html-minifier --input-dir . --output-dir . --file-ext html --collapse-whitespace --remove-comments --remove-optional-tags index.html && cd .. - - name: Minify CSS & JS - run: cd public/ && uglifyjs script.js -o script.min.js && uglifyjs simplex.js -o simplex.min.js && uglifyjs style.css -o style.min.css && cd .. + npm i minify -g + - name: Minify + run: cd public/ && minify index.html > index.html && minify script.js > script.min.js && minify simplex.js > simplex.min.js && minify style.css > style.min.css && cd .. - name: Test static page run: bash ${{ gitea.workspace }}/bin/test_static_page.sh - name: Deploy to Server