This commit is contained in:
@@ -42,6 +42,12 @@ jobs:
|
||||
fetch-depth: 0
|
||||
ref: ${{ steps.branch.outputs.branch }}
|
||||
|
||||
# 🚀 FAST MIRROR (India)
|
||||
- name: Use faster apt mirror
|
||||
run: |
|
||||
sudo sed -i 's|http://archive.ubuntu.com/ubuntu|http://in.archive.ubuntu.com/ubuntu|g' /etc/apt/sources.list
|
||||
sudo sed -i 's|http://security.ubuntu.com/ubuntu|http://in.archive.ubuntu.com/ubuntu|g' /etc/apt/sources.list
|
||||
|
||||
- name: Install Image Tools
|
||||
run: |
|
||||
sudo apt-get update
|
||||
@@ -50,16 +56,22 @@ jobs:
|
||||
- name: Resize Oversized Images
|
||||
run: |
|
||||
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) \
|
||||
-not -path "*/.git/*" \
|
||||
-not -path "*/node_modules/*" \
|
||||
-exec mogrify -resize 1920x1920\> {} \;
|
||||
|
||||
- name: Optimize JPEG
|
||||
run: |
|
||||
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) \
|
||||
-not -path "*/.git/*" \
|
||||
-not -path "*/node_modules/*" \
|
||||
-exec jpegoptim --strip-all --max=85 {} \;
|
||||
|
||||
- name: Optimize PNG
|
||||
run: |
|
||||
find . -type f -iname "*.png" \
|
||||
-not -path "*/.git/*" \
|
||||
-not -path "*/node_modules/*" \
|
||||
-exec pngquant --force --ext .png --quality=75-90 {} \;
|
||||
|
||||
- name: Commit changes
|
||||
|
||||
Reference in New Issue
Block a user