From 4c2be3ffab752dd824887878dc7ec9dec72a158f Mon Sep 17 00:00:00 2001 From: ToriLindsay Date: Wed, 27 Nov 2024 09:59:03 +0000 Subject: [PATCH] Fixed deploy command --- .../docs/workers/frameworks/framework-guides/nextjs.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/workers/frameworks/framework-guides/nextjs.mdx b/src/content/docs/workers/frameworks/framework-guides/nextjs.mdx index 411f6d83cc6c9d..13b5868c7f0ad7 100644 --- a/src/content/docs/workers/frameworks/framework-guides/nextjs.mdx +++ b/src/content/docs/workers/frameworks/framework-guides/nextjs.mdx @@ -95,7 +95,7 @@ Add the following to the scripts field of your `package.json` file: - `npm run build:worker`: Runs the [@opennextjs/cloudflare](https://www.npmjs.com/package/@opennextjs/cloudflare) adapter. This first builds your app by running `next build` behind the scenes, and then transforms the build output to a format that you can run locally using [Wrangler](/workers/wrangler/) and deploy to Cloudflare. - `npm run dev:worker`: Takes the output generated by `build:worker` and runs it locally in [workerd](https://github.com/cloudflare/workerd), the open-source Workers Runtime, allowing you to run the app locally in the same environment that it will run in production. If you instead run `next dev`, your app will run in Node.js, which is a different JavaScript runtime from the Workers runtime, with differences in behavior and APIs. - `npm run preview:worker`: Runs `build:worker` and then `dev:worker`, allowing you to quickly preview your app running locally in the Workers runtime, via a single command. -- `npm run deploy`: Builds your app, and then deploys it to Cloudflare +- `npm run deploy:worker`: Builds your app, and then deploys it to Cloudflare ### 4. Add caching with Workers KV @@ -138,7 +138,7 @@ In step 3, we also added the `npm run preview:worker`, which allows you to quick Either deploy via the command line: ```sh -npm run deploy +npm run deploy:worker ``` Or [connect a GitHub or GitLab repository](/workers/ci-cd/), and Cloudflare will automatically build and deploy each pull request you merge to your production branch.