We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e5a9e43 commit 2be4468Copy full SHA for 2be4468
1 file changed
.github/workflows/deploy.yml
@@ -21,11 +21,19 @@ jobs:
21
- name: Checkout
22
uses: actions/checkout@v4
23
24
- - name: Setup Node.js
+ # Use cache only when a lockfile exists; otherwise setup without cache
25
+ - name: Setup Node.js (cached)
26
+ if: ${{ hashFiles('**/package-lock.json') != '' || hashFiles('**/npm-shrinkwrap.json') != '' || hashFiles('**/yarn.lock') != '' }}
27
uses: actions/setup-node@v4
28
with:
29
node-version: '18'
30
cache: 'npm'
31
+
32
+ - name: Setup Node.js (no cache)
33
+ if: ${{ hashFiles('**/package-lock.json') == '' && hashFiles('**/npm-shrinkwrap.json') == '' && hashFiles('**/yarn.lock') == '' }}
34
+ uses: actions/setup-node@v4
35
+ with:
36
+ node-version: '18'
37
38
- name: Install dependencies
39
run: |
0 commit comments