Conversation
✅ Deploy Preview for astro-docs-2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
| The new way to deploy to a specific Cloudflare Enviroment uses the `CLOUDFLARE_ENV` variable. A possible command would look like `CLOUDFLARE_ENV=some-env astro build && wrangler deploy`. The environment is baked in during build phase, so compared to before, you need to build your project separately for all the enviroments. | ||
|
|
||
| In the past you could build your Astro project once and deploy it to a specific Cloudflare Environment by using `wrangler deploy --env some-env`. Since the new version uses the Cloudflare Vite Plugin the behavior changed according to [Cloudflare's official migration guide](https://developers.cloudflare.com/workers/vite-plugin/reference/migrating-from-wrangler-dev/#cloudflare-environments). The only available option is using the `CLOUDFLARE_ENV` variable according to [Cloudflare's Vite Plugin Reference](https://developers.cloudflare.com/workers/vite-plugin/reference/cloudflare-environments/). |
There was a problem hiding this comment.
Thanks, Alex! I tried to reorganize a bit the content to follow the structure we usually use (ie. what was the previous behavior then what changed, and when). Feel free, to correct anything wrong (e.g. is this related to Astro 5/6 or is this specific to the adapter version?) and to make any adjustments about the wording. You're the Cloudflare expert here, not me. 😅
I moved one link to a ReadMore component, and remove the other because... I wasn't sure how to integrate it and it seems this link has a direct link to the other one and so, maybe this is enough. Feel free to push back if you think this was important!
| The new way to deploy to a specific Cloudflare Enviroment uses the `CLOUDFLARE_ENV` variable. A possible command would look like `CLOUDFLARE_ENV=some-env astro build && wrangler deploy`. The environment is baked in during build phase, so compared to before, you need to build your project separately for all the enviroments. | |
| In the past you could build your Astro project once and deploy it to a specific Cloudflare Environment by using `wrangler deploy --env some-env`. Since the new version uses the Cloudflare Vite Plugin the behavior changed according to [Cloudflare's official migration guide](https://developers.cloudflare.com/workers/vite-plugin/reference/migrating-from-wrangler-dev/#cloudflare-environments). The only available option is using the `CLOUDFLARE_ENV` variable according to [Cloudflare's Vite Plugin Reference](https://developers.cloudflare.com/workers/vite-plugin/reference/cloudflare-environments/). | |
| In Astro 5.x, you could build your Astro project once and deploy it to a specific Cloudflare Environment with `wrangler deploy --env some-env`. | |
| Since Astro 6.0, the integration relies on the Cloudflare Vite plugin and this behavior has changed. The environment is now baked during the build phase. Therefore, you must build your project separately for each environment. | |
| To deploy to a specific Cloudflare environment, prefix your command with the `CLOUDFLARE_ENV` variable. For example, the command `CLOUDFLARE_ENV=some-env astro build && wrangler deploy` will build your Astro project and deploy it with Wrangler using the `some-env` environment. | |
| <ReadMore>Learn how to update your [Cloudflare's environments in the Migrate from wrangler dev guide](https://developers.cloudflare.com/workers/vite-plugin/reference/cloudflare-environments/).</ReadMore> |
Description (required)
This adds a missed behavior change in the Cloudflare migration guide about deploying to specific Cloudflare Environment.
Related issues & labels (optional)