Skip to content

Commit eeb8625

Browse files
authored
Ensure package-lock.json exists in deploy workflow
Added a step to ensure package-lock.json exists before installing dependencies.
1 parent 6d1fd10 commit eeb8625

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,15 @@ jobs:
3232
- name: Setup Pages
3333
uses: actions/configure-pages@v4
3434

35+
- name: Ensure lock file exists
36+
run: |
37+
if [ ! -f package-lock.json ]; then
38+
echo "Error: package-lock.json is missing. Run 'npm install' locally and commit the generated lock file."
39+
exit 1
40+
fi
41+
3542
- name: Install dependencies
36-
run: npm install
43+
run: npm ci
3744

3845
- name: Build with VitePress
3946
run: npm run build

0 commit comments

Comments
 (0)