Skip to content

Commit

Permalink
chore: Optimizing PNG images
Browse files Browse the repository at this point in the history
  • Loading branch information
b00f committed Jun 12, 2024
1 parent 6865dab commit 3b7564f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 3b7564f

Please sign in to comment.