Skip to content

Commit 0f8f6d2

Browse files
author
marci
committed
Enhance GitHub Actions workflow by adding Node.js setup and improving dependency installation logic
1 parent d79fa17 commit 0f8f6d2

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/deploy-site.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,18 @@ jobs:
4242
- name: Setup Pages
4343
id: pages
4444
uses: actions/configure-pages@v5
45+
- name: Setup Node.js
46+
uses: actions/setup-node@v4
47+
with:
48+
node-version: "20"
49+
cache: "npm"
4550
- name: Install Node.js dependencies
46-
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
51+
run: |
52+
if [[ -f package-lock.json || -f npm-shrinkwrap.json ]]; then
53+
npm ci
54+
elif [[ -f package.json ]]; then
55+
npm install
56+
fi
4757
- name: Cache Restore
4858
id: cache-restore
4959
uses: actions/cache/restore@v4

0 commit comments

Comments
 (0)