Add a caching step for image optimizations

This commit is contained in:
2026-08-09 21:39:05 -04:00
parent 7fb4e918d3
commit cfcf4cedca

View File

@@ -43,11 +43,21 @@ jobs:
- name: Setup Pages - name: Setup Pages
id: pages id: pages
uses: actions/configure-pages@v5 uses: actions/configure-pages@v5
- name: Restore optimized images from cache
uses: actions/cache/restore@v4
with:
path: ./_site/assets/img
- name: Build with Jekyll - name: Build with Jekyll
# Outputs to the './_site' directory by default # Outputs to the './_site' directory by default
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env: env:
JEKYLL_ENV: production JEKYLL_ENV: production
- name: Save images to cache
if: steps.cache-unity.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: ./_site/assets/img
key: images
- name: Upload artifact - name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default # Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v3 uses: actions/upload-pages-artifact@v3