| 1 | # Cloudflare Website: Astro |
| 2 | |
| 3 | Deploys an [Astro](https://astro.build) site to Cloudflare Workers with |
| 4 | `Cloudflare.Website.Astro` — no `astro.config.*`, adapter setup, or |
| 5 | Wrangler configuration. |
| 6 | |
| 7 | - `src/pages/index.astro` is server-rendered in the Worker on every |
| 8 | request and reads the `GREETING` binding declared in `alchemy.run.ts`. |
| 9 | - `src/pages/about.astro` opts into prerendering |
| 10 | (`export const prerender = true`) and is served as a static asset. |
| 11 | - Everything under `public/` deploys as static assets. |
| 12 | |
| 13 | The integration package must be installed in the project (it is loaded |
| 14 | dynamically at deploy time): |
| 15 | |
| 16 | ```sh |
| 17 | bun add -d @alchemy.run/frontend-frameworks |
| 18 | ``` |
| 19 | |
| 20 | ## Deploy |
| 21 | |
| 22 | ```sh |
| 23 | bun run deploy |
| 24 | ``` |
| 25 | |
| 26 | Unchanged sources skip the Astro build entirely on subsequent deploys — |
| 27 | the input files are content-hashed (scoped by `memo.include`). |
| 28 | |
| 29 | ## Destroy |
| 30 | |
| 31 | ```sh |
| 32 | bun run destroy |
| 33 | ``` |