Skip to content

Commit a013cfc

Browse files
committed
Move to Workers
1 parent 080a884 commit a013cfc

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

.github/workflows/publish-preview.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-22.04
1313
permissions:
1414
contents: read
15-
name: Publish to Cloudflare Pages (Preview)
15+
name: Publish Preview
1616
steps:
1717
- uses: actions/checkout@v4
1818
- uses: actions/setup-node@v4
@@ -35,7 +35,7 @@ jobs:
3535
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
3636
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
3737
- run: npm run build:worker && npx wrangler versions upload -c ./wrangler-workers.toml
38-
name: Deploy to Cloudflare Workers [preview]
38+
name: Deploy to Cloudflare Workers
3939
env:
4040
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
4141
- uses: actions/cache/save@v4

.github/workflows/publish-production.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-22.04
99
permissions:
1010
contents: read
11-
name: Publish to Cloudflare Pages (Production)
11+
name: Publish Production
1212
steps:
1313
- uses: actions/checkout@v4
1414
- uses: actions/setup-node@v4
@@ -30,6 +30,10 @@ jobs:
3030
env:
3131
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
3232
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
33+
- run: npx wrangler deploy -c ./wrangler-workers.toml
34+
name: Deploy to Cloudflare Workers
35+
env:
36+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
3337
- uses: actions/cache/save@v4
3438
if: always()
3539
with:

wrangler-workers.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
#:schema ./node_modules/wrangler/config-schema.json
12
name = "cloudflare-docs"
23
account_id = "b54f07a6c269ecca2fa60f1ae4920c99"
34
compatibility_date = "2022-09-27"
45
main = "./worker/index.ts"
56

7+
route = { pattern = "developers.cloudflare.com/*", zone_name = "developers.cloudflare.com"}
8+
69
rules = [
710
{ type = "Text", globs = ["**/_redirects"], fallthrough = true },
811
]

wrangler.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1+
#:schema ./node_modules/wrangler/config-schema.json
12
name = "cloudflare-docs"
23
compatibility_date = "2022-09-27"
3-

0 commit comments

Comments
 (0)