diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 131af70..07e0c23 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -28,10 +28,13 @@ jobs: with: node-version: lts/* - - name: Install step + - name: Install trunk run: "cargo install trunk" - - name: Build step + - name: Create dist directory + run: "mkdir dist" + + - name: Build wasm run: "trunk build --release" - name: Upload to Deno Deploy diff --git a/.gitignore b/.gitignore index ea8c4bf..4f96631 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /target +/dist diff --git a/Trunk.toml b/Trunk.toml index a09cf29..e036616 100644 --- a/Trunk.toml +++ b/Trunk.toml @@ -2,7 +2,7 @@ # Point to our `index.html`. target = "apps/web/index.html" # Set the output directory for the web build. -dist = "target/trunk" +dist = "dist" # This is needed in order to host the game on itch.io. public_url = "./" diff --git a/webserver.ts b/webserver.ts index 87a72c9..ea7ffbe 100644 --- a/webserver.ts +++ b/webserver.ts @@ -2,7 +2,7 @@ import { serveDir } from "jsr:@std/http/file-server"; Deno.serve((request: Request) => { return serveDir(request, { - fsRoot: "target/trunk", + fsRoot: "dist", urlRoot: "", showIndex: true, });