Skip to content

Commit

Permalink
setup cache for node_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Aug 12, 2023
1 parent 5af88e2 commit e8504f4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/dagger/jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ export const deploy = async (client: Client, src = ".") => {
"/root/.bun/install/cache",
client.cacheVolume("bun-cache")
)
.withMountedCache("/app/node_modules", client.cacheVolume("node_modules"))
.withEnvVariable("NIX_INSTALLER_NO_CHANNEL_ADD", "1")
.withDirectory("/app", context, {
exclude: [".git", ".devbox", "node_modules", ".fluentci"],
})
.withWorkdir("/app")
.withEnvVariable("CF_API_TOKEN", Deno.env.get("CF_API_TOKEN") || "")
.withEnvVariable("CF_ACCOUNT_ID", Deno.env.get("CF_ACCOUNT_ID") || "")
.withExec(["devbox", "global", "run", "--", "bun install"])
.withExec(["sh", "-c", "devbox global run -- bun x wrangler deploy"]);

const result = await ctr.stdout();
Expand Down

0 comments on commit e8504f4

Please sign in to comment.