Skip to content

Commit 8d9f8c9

Browse files
committed
wip
1 parent 1291be9 commit 8d9f8c9

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

action.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ inputs:
1616
description: "Path of the directory containing your site"
1717
required: false
1818
default: "."
19-
deno-setup-task:
20-
description: "Name of the optional Deno task to run before build (will be skipped if undefined)"
21-
required: false
22-
default: "setup"
2319

2420
runs:
2521
using: composite
@@ -108,17 +104,25 @@ runs:
108104
with:
109105
node-version: ${{ inputs.node-version }}
110106

111-
- name: Install (npm/yarn/pnpm)
112-
if: ${{ env.PACKAGE_MANAGER != 'deno' }}
113-
shell: bash
114-
working-directory: ${{ inputs.path }}
115-
run: $PACKAGE_MANAGER install
116-
117-
- name: Cache deps & vendor (Deno)
118-
if: ${{ env.PACKAGE_MANAGER == 'deno' }}
107+
- name: Install
119108
shell: bash
120109
working-directory: ${{ inputs.path }}
121-
run: deno task ${{ inputs.deno-setup-task }} || echo "No deno ${{ inputs.deno-setup-task }} task defined - skipping"
110+
run: |
111+
if [ "$PACKAGE_MANAGER" = "deno" ]; then
112+
# For Deno projects with deno.json, cache dependencies
113+
if [ -f "deno.json" ] || [ -f "deno.jsonc" ]; then
114+
echo "Caching Deno dependencies..."
115+
deno cache --lock=deno.lock --lock-write **/*.ts **/*.tsx 2>/dev/null || true
116+
fi
117+
# For hybrid projects with package.json, install npm dependencies
118+
if [ -f "package.json" ]; then
119+
echo "Installing npm dependencies with Deno..."
120+
deno install --allow-scripts
121+
fi
122+
else
123+
# Standard package manager install
124+
$PACKAGE_MANAGER install
125+
fi
122126
123127
- name: Build (npm/yarn/pnpm/bun)
124128
if: ${{ env.PACKAGE_MANAGER != 'deno' }}

0 commit comments

Comments
 (0)