diff --git a/README.md b/README.md index 87b813a..ee32d92 100644 --- a/README.md +++ b/README.md @@ -41,3 +41,12 @@ All commands are run from the root of the project, from a terminal: ## 👀 Want to learn more? Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat). + +## Cloudflare deploy notes + +If you deploy with Wrangler in CI/Cloudflare, build first and deploy using Astro's generated Worker config: + +- Build command: `npm run build` +- Deploy command: `npm run deploy:cf` + +This avoids entrypoint errors like `@astrojs/cloudflare/entrypoints/server` not found. diff --git a/package.json b/package.json index 025f504..0125e90 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "dev": "astro dev", "dev:fresh": "node -e \"require('fs').rmSync('node_modules/.vite',{recursive:true,force:true});\" && astro dev", "build": "astro build", + "deploy:cf": "npm run build && wrangler deploy --config dist/server/wrangler.json", "preview": "astro preview", "astro": "astro", "generate-types": "wrangler types"