diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e7a9de9..e3cac65 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -37,12 +37,15 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Install dependencies + run: | + sudo apt-get install pngquant + - name: Setup Hugo run: | wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ && sudo dpkg -i ${{ runner.temp }}/hugo.deb - - name: Build with Hugo env: # For maximum backward compatibility with Hugo modules @@ -53,6 +56,9 @@ jobs: --gc --minify \ --baseURL "https://docs.pactus.com/" + - name: Optimizing PNG images + run: find "./public" -type f -name "*.png" -exec pngquant --verbose --force --ext .png {} \; + - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: