Skip to content

Commit c51d1fc

Browse files
committed
fix: configure wrangler.toml for Pages and add project creation step
1 parent 120ab34 commit c51d1fc

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

.github/workflows/deploy.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ jobs:
4242
- uses: actions/setup-node@v5
4343
- run: npm ci
4444
- run: npm run build
45+
- name: Create Pages Project (if not exists)
46+
uses: cloudflare/wrangler-action@v3
47+
with:
48+
command: pages project create ${{ needs.get-env.outputs.project-name }} --production-branch master
49+
apiToken: ${{ secrets.CF_WORKER_API_TOKEN }}
50+
accountId: ${{ secrets.CF_WORKER_ACCOUNT_ID }}
51+
continue-on-error: true
52+
4553
- name: Deploy to Cloudflare Pages
4654
uses: cloudflare/wrangler-action@v3
4755
with:

wrangler.toml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
name = "polygon-token-list"
22
compatibility_date = "2024-12-30"
3-
placement = { mode = "smart" }
4-
preview_urls = false
5-
send_metrics = false
6-
workers_dev = false
7-
8-
# Static assets only
9-
[assets]
10-
directory = "build"
3+
pages_build_output_dir = "build"
114

125
[env.staging]
136
routes = [

0 commit comments

Comments
 (0)