Skip to content

Commit 9159acf

Browse files
authored
Move to Workers (#17502)
* Move to Workers * Add a thing to force a trailing slash for redirect evaluation * Standardize _redirects * Add tests (#17503) * Exclude tests from typechecking
1 parent 81cbf7e commit 9159acf

File tree

15 files changed

+2330
-91
lines changed

15 files changed

+2330
-91
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,6 @@ jobs:
4646

4747
- name: Check - Validate redirects (infinite loops, sources with fragment)
4848
run: npx tsm bin/validate-redirects.ts
49+
50+
- name: Tests
51+
run: npm run test

.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:

0 commit comments

Comments
 (0)