Skip to content

Commit 45e7368

Browse files
committed
fix: use npm install when package-lock.json is missing
1 parent e95b051 commit 45e7368

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ jobs:
2424
cache: 'npm'
2525

2626
- name: Install dependencies
27-
run: npm ci
27+
run: |
28+
if [ -f package-lock.json ]; then
29+
npm ci
30+
else
31+
npm install
32+
fi
2833
2934
- name: Run linter
3035
run: npm run lint || true
@@ -52,7 +57,12 @@ jobs:
5257
registry-url: 'https://registry.npmjs.org'
5358

5459
- name: Install dependencies
55-
run: npm ci
60+
run: |
61+
if [ -f package-lock.json ]; then
62+
npm ci
63+
else
64+
npm install
65+
fi
5666
5767
- name: Build
5868
run: npm run build

0 commit comments

Comments
 (0)