Skip to content

Commit 8836bcd

Browse files
committed
Cache optimized images when deploying
1 parent 49fe28b commit 8836bcd

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Deploy to GitHub Pages
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
workflow_dispatch:
77

88
permissions:
@@ -16,6 +16,12 @@ jobs:
1616
steps:
1717
- name: Checkout repository using Git
1818
uses: actions/checkout@v3
19+
- name: Cache images
20+
uses: actions/cache@v3
21+
with:
22+
path: node_modules/.cache/astro-optimize-images
23+
key: image-cache-${{ runner.os }}-${{ hashFiles('**/src/assets/**') }}
24+
restore-keys: image-cache-${{ runner.os }}-
1925
- name: Install, build, and upload website
2026
uses: withastro/action@v0
2127
with:

0 commit comments

Comments
 (0)