From e8504f4f326649e3e20ed0f482b2a1df1572b5d3 Mon Sep 17 00:00:00 2001 From: Tsiry Sandratraina Date: Sat, 12 Aug 2023 02:47:14 +0000 Subject: [PATCH] setup cache for node_modules --- src/dagger/jobs.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/dagger/jobs.ts b/src/dagger/jobs.ts index 882ef7f..37eb5f8 100644 --- a/src/dagger/jobs.ts +++ b/src/dagger/jobs.ts @@ -26,6 +26,7 @@ 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"], @@ -33,6 +34,7 @@ export const deploy = async (client: Client, src = ".") => { .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();