Skip to content

Commit a46568c

Browse files
committed
[Docs Site] Cache Astro assets in ci.yml
1 parent 599c378 commit a46568c

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,13 @@ jobs:
2020
- uses: actions/setup-node@v4
2121
with:
2222
node-version: 22
23-
24-
- name: Get npm cache directory
25-
id: npm-cache-dir
26-
shell: bash
27-
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
28-
29-
- uses: actions/cache@v4
30-
id: npm-cache
23+
cache: "npm"
24+
- uses: actions/cache/restore@v4
3125
with:
32-
path: ${{ steps.npm-cache-dir.outputs.dir }}
33-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
34-
restore-keys: |
35-
${{ runner.os }}-node-
26+
path: |
27+
node_modules/.astro/_astro
28+
node_modules/.astro/assets
29+
key: static
3630

3731
- run: npm ci
3832
- run: npm run check
@@ -44,5 +38,12 @@ jobs:
4438
NODE_OPTIONS: "--max-old-space-size=4192"
4539
RUN_LINK_CHECK: true
4640

41+
- uses: actions/cache/save@v4
42+
with:
43+
path: |
44+
node_modules/.astro/_astro
45+
node_modules/.astro/assets
46+
key: static
47+
4748
- name: Check - Validate redirects (infinite loops, sources with fragment)
4849
run: npx tsm bin/validate-redirects.ts

0 commit comments

Comments
 (0)