From 243cd9d16228d34bd1a3451a10cc39d61e7df7cf Mon Sep 17 00:00:00 2001 From: jp-knj Date: Sat, 31 May 2025 01:11:28 +0900 Subject: [PATCH 1/4] feat: add deno.json --- deno.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 deno.json diff --git a/deno.json b/deno.json new file mode 100644 index 0000000..41a2ed7 --- /dev/null +++ b/deno.json @@ -0,0 +1,7 @@ +{ + "unstable": ["bare-node-builtins"], + "tasks": { + "setup": "deno cache .", + "build": "deno run --allow-read --allow-run --allow-env npm:astro build" + } +} From b6162a13777a0833d4a81c985f9434dcc6ca5fee Mon Sep 17 00:00:00 2001 From: jp-knj Date: Sat, 31 May 2025 01:12:06 +0900 Subject: [PATCH 2/4] feat: ignore deno.lock --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 02f6e50..10c4d92 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ dist/ # dependencies node_modules/ +deno.lock # logs npm-debug.log* From fa9d21029623d9804d4efa463abf405e160276b9 Mon Sep 17 00:00:00 2001 From: jp-knj Date: Sat, 31 May 2025 01:16:11 +0900 Subject: [PATCH 3/4] feat: update step to setup and build a astro site --- .github/workflows/deploy.yml | 6 +++++- README.md | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 71acd3a..504f6d3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,7 +26,11 @@ jobs: - name: Checkout your repository using git uses: actions/checkout@v2 - name: Install, build, and upload your site output - uses: withastro/action@v0 + uses: withastro/action@v2 + # with: + # deno-version: 1.38.3 # The specific version of Deno that should be used to build your site. Defaults to 1.38.3. (optional) + # deno-setup-task: setup # The Deno task that should be run to build your site. Defaults to setup. (optional) + # build-command: deno task build # The command that should be run to build your site. Defaults to deno task build. (optional) # with: # path: . # The root location of your Astro project inside the repository. (optional) # node-version: 16 # The specific version of Node that should be used to build your site. Defaults to 16. (optional) diff --git a/README.md b/README.md index bdb1377..1408f21 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,9 @@ All commands are run from the root of the project, from a terminal: | `npm run preview` | Preview your build locally, before deploying | | `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | | `npm run astro --help` | Get help using the Astro CLI | +| `deno install astro` | Installs dependencies | +| `deno task setup` | *(Deno only)* Cache remote deps (`deno.json`) | +| `deno task build` | *(Deno only)* Run your build task (`deno.json`) | ## 👀 Want to learn more? From 2b11c88df945efbbd2acea676f061eb316e6fe6c Mon Sep 17 00:00:00 2001 From: jp-knj Date: Sat, 31 May 2025 01:22:18 +0900 Subject: [PATCH 4/4] feat: add deno.json --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1408f21..265f374 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Inside of your Astro project, you'll see the following folders and files: ├── src/ │ └── pages/ │ └── index.astro +├── deno.json └── package.json ```