-
Notifications
You must be signed in to change notification settings - Fork 6
44 lines (36 loc) · 1.05 KB
/
deploy-worker.yml
File metadata and controls
44 lines (36 loc) · 1.05 KB
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
37
38
39
40
41
42
43
44
name: Deploy Dropbox Relay Worker
on:
workflow_dispatch:
push:
branches: ["main"]
paths:
- "worker/**"
- ".github/workflows/deploy-worker.yml"
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
cache-dependency-path: worker/package-lock.json
- name: Install worker dependencies
run: npm ci
working-directory: worker
- name: Dry-run deploy (build verification)
run: npx wrangler deploy --dry-run --outdir=dist
working-directory: worker
- name: Verify deploy credentials
run: |
test -n "$CLOUDFLARE_API_TOKEN"
test -n "$CLOUDFLARE_ACCOUNT_ID"
- name: Deploy dropbox relay worker
run: npx wrangler deploy
working-directory: worker