forked from jonbarrow/simple-cf-worker-cors-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (28 loc) · 844 Bytes
/
cloudflare.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Deploy Worker
# this action is for the "deploy to cloudflare" button
# repository_dispatch is triggered by CF
# secrets should also be made by CF
on: ["repository_dispatch"]
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: latest
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'pnpm'
- name: Install packages
run: pnpm install --frozen-lockfile
- name: Build Project
run: pnpm build:cloudflare
- name: Build & Deploy Worker
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}