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/.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* diff --git a/README.md b/README.md index bdb1377..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 ``` @@ -37,6 +38,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? 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" + } +}