Skip to content

Commit 1291be9

Browse files
committed
wip
1 parent ecde5fe commit 1291be9

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

action.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,13 @@ inputs:
99
required: false
1010
default: "22"
1111
package-manager:
12-
description: "You may specify your preferred package manager (one of `npm | yarn | pnpm | bun` and an optional `@<version>` tag). Otherwise, the package manager will be automatically detected."
12+
description: "You may specify your preferred package manager (one of `npm | yarn | pnpm | bun | deno` and an optional `@<version>` tag). Otherwise, the package manager will be automatically detected."
1313
required: false
1414
default: ""
1515
path:
1616
description: "Path of the directory containing your site"
1717
required: false
1818
default: "."
19-
deno-version:
20-
description: "The Deno version to use when deno.json/deno.jsonc/deno.lock exists"
21-
required: false
22-
default: "1.x"
2319
deno-setup-task:
2420
description: "Name of the optional Deno task to run before build (will be skipped if undefined)"
2521
required: false
@@ -40,9 +36,17 @@ runs:
4036
VERSION=$(echo "$INPUT_PM" | { grep -o '@.*' || true; } | sed 's/^@//')
4137
# Set default VERSION if not provided
4238
if [ -z "$VERSION" ]; then
43-
VERSION="latest"
39+
if [ "$PACKAGE_MANAGER" = "deno" ]; then
40+
VERSION="1.x"
41+
else
42+
VERSION="latest"
43+
fi
4444
fi
4545
echo "PACKAGE_MANAGER=$PACKAGE_MANAGER" >> $GITHUB_ENV
46+
# Set lockfile for deno when explicitly specified
47+
if [ "$PACKAGE_MANAGER" = "deno" ]; then
48+
echo "LOCKFILE=deno.lock" >> $GITHUB_ENV
49+
fi
4650
elif [ $(find "." -maxdepth 1 -name "pnpm-lock.yaml") ]; then
4751
echo "PACKAGE_MANAGER=pnpm" >> $GITHUB_ENV
4852
echo "LOCKFILE=pnpm-lock.yaml" >> $GITHUB_ENV
@@ -62,9 +66,9 @@ runs:
6266
echo "PACKAGE_MANAGER=bun" >> $GITHUB_ENV
6367
echo "LOCKFILE=bun.lockb" >> $GITHUB_ENV
6468
elif [ -f "deno.json" ] || [ -f "deno.jsonc" ] || [ -f "deno.lock" ]; then
65-
VERSION="${{ inputs.deno-version }}"
69+
VERSION="1.x"
6670
echo "PACKAGE_MANAGER=deno" >> $GITHUB_ENV
67-
echo "LOCKFILE=deno.lock" >> $GITHUB_ENV
71+
echo "LOCKFILE=deno.lock" >> $GITHUB_ENV
6872
else
6973
echo "No lockfile found.
7074
Please specify your preferred \"package-manager\" in the action configuration."
@@ -127,3 +131,8 @@ runs:
127131
shell: bash
128132
working-directory: ${{ inputs.path }}
129133
run: deno task build
134+
135+
- name: Upload Pages Artifact
136+
uses: actions/upload-pages-artifact@v3
137+
with:
138+
path: "${{ inputs.path }}/dist/"

0 commit comments

Comments
 (0)