Skip to content

Commit a05a7bb

Browse files
committed
fix: add step to create Cloudflare Pages project on first deploy
1 parent 9e0227d commit a05a7bb

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/cloudflare-pages.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ jobs:
2929
env:
3030
BUILD_STANDALONE: false
3131

32+
- name: Create Cloudflare Pages Project (if needed)
33+
uses: cloudflare/wrangler-action@v3
34+
with:
35+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
36+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
37+
command: pages project create daniel-ilies --production-branch main
38+
continue-on-error: true # Ignore if project already exists
39+
3240
- name: Publish to Cloudflare Pages
3341
uses: cloudflare/wrangler-action@v3
3442
with:

0 commit comments

Comments
 (0)