File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 26
26
with :
27
27
node-version : ' 16.x'
28
28
registry-url : ' https://registry.npmjs.org'
29
+ cache : ' npm'
29
30
- name : Restore cache
30
31
uses : actions/cache@v2
31
32
with :
45
46
with :
46
47
node-version : ' 16.x'
47
48
registry-url : ' https://registry.npmjs.org'
49
+ cache : ' npm'
48
50
- name : Restore cache
49
51
uses : actions/cache@v2
50
52
with :
@@ -94,10 +96,22 @@ jobs:
94
96
with :
95
97
node-version : ' 16.x'
96
98
registry-url : ' https://registry.npmjs.org'
99
+ cache : ' npm'
97
100
98
101
- name : Install
99
102
run : npm install
100
103
104
+ - name : Restore build cache
105
+ uses : actions/cache@v3
106
+ with :
107
+ # Gatsby requires both .cache and public. It will refuse to use .cache/ if public/ is not present.
108
+ path : |
109
+ .cache
110
+ public
111
+ # Cache will not be used by Gatsby if the following files change:
112
+ # https://www.gatsbyjs.com/docs/build-caching/
113
+ key : pr-gatsby-${{ hashFiles('package.json', 'gatsby-config.js', 'gatsby-node.js') }}
114
+
101
115
- name : Build
102
116
run : npm run build
103
117
You can’t perform that action at this time.
0 commit comments