ci(amplify): run image optimizer in Amplify preBuild; upload artifacts from GH Action

This commit is contained in:
Gregory Campbell
2026-06-03 21:55:34 -04:00
parent b415397a5a
commit 8b94c23397
2 changed files with 23 additions and 11 deletions
+5 -11
View File
@@ -35,14 +35,8 @@ jobs:
- name: Run image optimizer
run: npm run optimize-images
- name: Commit optimized images
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add public/images || true
if ! git diff --staged --quiet; then
git commit -m "chore(images): add optimized WebP images [skip ci]" || echo "no changes to commit"
git push
else
echo "No optimized images to commit"
fi
- name: Upload optimized images
uses: actions/upload-artifact@v4
with:
name: optimized-images
path: public/images