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