Skip to content

Commit 5b4f8d7

Browse files
committed
Configure Cloudflare Workers static-assets deploy (wrangler deploy)
1 parent 09768c3 commit 5b4f8d7

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ jobs:
2929
- run: pnpm install --frozen-lockfile
3030
- run: pnpm build
3131

32-
- name: Publish to Cloudflare Pages
32+
- name: Publish to Cloudflare
3333
uses: cloudflare/wrangler-action@v3
3434
with:
3535
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
3636
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
37-
command: pages deploy dist --project-name=prodscript
37+
command: deploy

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"lint": "oxlint",
1010
"preview": "vite preview",
1111
"og": "node scripts/make-og.mjs",
12-
"deploy": "pnpm build && pnpm dlx wrangler pages deploy dist --project-name=prodscript"
12+
"deploy": "pnpm build && pnpm dlx wrangler deploy"
1313
},
1414
"dependencies": {
1515
"react": "^19.2.7",

wrangler.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
# Cloudflare Pages project config.
2-
# Enables `wrangler pages deploy` and CI to know where the built site lives.
1+
# Cloudflare Workers — static assets. Serves the built Vite site from ./dist.
2+
# Cloudflare's unified Workers/Pages flow deploys this with `wrangler deploy`.
33
name = "prodscript"
44
compatibility_date = "2026-06-23"
5-
pages_build_output_dir = "dist"
5+
6+
[assets]
7+
directory = "./dist"
8+
not_found_handling = "404-page"

0 commit comments

Comments
 (0)