Skip to content

Commit 462126e

Browse files
authored
Update workflow for Cloudflare Worker deployment
1 parent da8e033 commit 462126e

File tree

1 file changed

+8
-45
lines changed

1 file changed

+8
-45
lines changed
Lines changed: 8 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,16 @@
1-
name: Deploy to GitHub Pages
2-
1+
name: Deploy Worker
32
on:
43
push:
54
branches:
65
- main
7-
workflow_dispatch:
8-
9-
permissions:
10-
contents: read
11-
pages: write
12-
id-token: write
13-
14-
concurrency:
15-
group: "pages"
16-
cancel-in-progress: false
17-
186
jobs:
19-
build:
20-
runs-on: ubuntu-latest
21-
steps:
22-
- name: Checkout
23-
uses: actions/checkout@v4
24-
25-
- name: Setup Bun
26-
uses: oven-sh/setup-bun@v1
27-
with:
28-
bun-version: latest
29-
30-
- name: Install dependencies
31-
run: bun install
32-
33-
- name: Build
34-
run: bun run build
35-
36-
- name: Setup Pages
37-
uses: actions/configure-pages@v4
38-
39-
- name: Upload artifact
40-
uses: actions/upload-pages-artifact@v3
41-
with:
42-
path: ./_site
43-
447
deploy:
45-
environment:
46-
name: github-pages
47-
url: ${{ steps.deployment.outputs.page_url }}
488
runs-on: ubuntu-latest
49-
needs: build
9+
timeout-minutes: 60
5010
steps:
51-
- name: Deploy to GitHub Pages
52-
id: deployment
53-
uses: actions/deploy-pages@v4
11+
- uses: actions/checkout@v4
12+
- name: Build & Deploy Worker
13+
uses: cloudflare/wrangler-action@v3
14+
with:
15+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
16+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}

0 commit comments

Comments
 (0)