Skip to content

Commit 739727a

Browse files
authored
Migrate docs deploy from Cloudflare Pages to Workers (#2967)
1 parent be4a240 commit 739727a

3 files changed

Lines changed: 14 additions & 13 deletions

File tree

‎.github/workflows/main.yml‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,14 @@ jobs:
8484
- name: Build docs
8585
run: uv run zensical build
8686

87-
- name: Deploy preview to Cloudflare Pages
87+
- name: Deploy preview to Cloudflare Workers
8888
id: deploy
8989
if: ${{ env.HAS_CLOUDFLARE_TOKEN == 'true' }}
90-
uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3.14.1
90+
uses: cloudflare/wrangler-action@ebbaa1584979971c8614a24965b4405ff95890e0 # v4.0.0
9191
with:
9292
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
93-
command: >
94-
pages deploy ./site
95-
--project-name uvicorn
96-
--commit-hash ${{ github.event.pull_request.head.sha }}
97-
--branch ${{ github.head_ref }}
93+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
94+
command: versions upload --tag pr-${{ github.event.pull_request.number }}
9895

9996
- name: Comment preview URL on PR
10097
if: ${{ steps.deploy.outcome == 'success' }}

‎.github/workflows/publish.yml‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,8 @@ jobs:
105105
name: documentation
106106
path: site/
107107

108-
- uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3.14.1
108+
- uses: cloudflare/wrangler-action@ebbaa1584979971c8614a24965b4405ff95890e0 # v4.0.0
109109
with:
110110
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
111-
command: >
112-
pages deploy ./site
113-
--project-name uvicorn
114-
--commit-hash ${{ github.sha }}
115-
--branch main
111+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
112+
command: deploy

‎wrangler.toml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name = "uvicorn"
2+
compatibility_date = "2026-05-22"
3+
workers_dev = true
4+
5+
[assets]
6+
directory = "./site"
7+
not_found_handling = "404-page"

0 commit comments

Comments
 (0)