Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit d833b90

Browse files
committed
cache public and cache directories during GH actions build
1 parent 849251c commit d833b90

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

.github/workflows/production.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,8 @@ jobs:
3030
env:
3131
cache-name: cache-node-modules
3232
with:
33-
path: |
34-
public
35-
.cache
36-
./node_modules
37-
key: modules-${{ hashFiles('package-lock.json') }}
33+
path: ./node_modules
34+
key: modules-${{ hashFiles('package-lock.json') }}
3835
- name: Install Node.js dependencies
3936
run: |
4037
npm ci
@@ -61,6 +58,17 @@ jobs:
6158
restore-keys: |
6259
${{ runner.os }}-node-
6360
61+
- name: Cache Gatsby
62+
id: gatsby-cache-build
63+
uses: actions/cache@v2
64+
with:
65+
path: |
66+
public
67+
.cache
68+
key: ${{ runner.os }}-gatsby-build-${{ github.run_id }}
69+
restore-keys: |
70+
${{ runner.os }}-gatsby-build-
71+
6472
- run: npm ci
6573
- run: npm run format
6674
- run: npm run test

.github/workflows/staging.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
restore-keys: |
6161
${{ runner.os }}-node-
6262
63-
- name: Caching Gatsby
63+
- name: Cache Gatsby
6464
id: gatsby-cache-build
6565
uses: actions/cache@v2
6666
with:

0 commit comments

Comments
 (0)