> How to deploy Nuxt to Cloudflare Workers with Nuxt Nitro.
- Support for serverless SSR build
- Zero millisecond cold start with edge rendering
- Minimal configuration required
## Setup
Login to your [Cloudflare Workers](https://workers.cloudflare.com) account and obtain your `account_id` from the sidebar.
Create a `wrangler.toml` in your root directory:
```ini{}[wrangler.toml]
name = "playground"
type = "javascript"
account_id = "<theaccount_idyouobtained>"
workers_dev = true
route = ""
zone_id = ""
[site]
bucket = ".output/public"
entry-point = ".output"
```
## Deploy from your local machine using wrangler
Install [wrangler](https://github.com/cloudflare/wrangler) and login to your Cloudflare account:
```bash
npm i @cloudflare/wrangler -g
wrangler login
```
Generate website with `cloudflare` preset:
```bash
NITRO_PRESET=cloudflare yarn build
```
You can preview locally:
```bash
wrangler dev
```
Publish:
```bash
wrangler publish
```
## Deploy within CI/CD using Github Actions
Create a token according to [the wrangler action docs](https://github.com/marketplace/actions/deploy-to-cloudflare-workers-with-wrangler#authentication) and set `CF_API_TOKEN` in your repository config on GitHub.