Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,32 @@ npm run build

You can preview the production build with `npm run preview`.

> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
## Deploying

The site runs on Cloudflare Workers, not Pages. `@sveltejs/adapter-cloudflare`
writes a worker and its static assets to `.svelte-kit/cloudflare`, and
`wrangler.jsonc` points at both.

Pushes to `main` go through Workers Builds. Dashboard settings:

| Setting | Value |
| -------------- | --------------------- |
| Build command | `npm run build` |
| Deploy command | `npx wrangler deploy` |
| Root directory | `/` |

There is no build output directory to configure. Wrangler takes the paths from
`wrangler.jsonc`, so if the adapter ever changes where it writes, update `main`
and `assets.directory` to match.

To deploy by hand:

```sh
npx wrangler login
npm run deploy
```

Do not connect this repo to Pages. The Pages pipeline wants
`pages_build_output_dir` in the wrangler config, finds Workers keys instead,
skips the file, and then fails looking for a `dist` directory that nothing
creates.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"deploy": "vite build && wrangler deploy",
"prepare": "svelte-kit sync || echo ''",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
Expand Down