-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (71 loc) · 1.96 KB
/
deploy-workers.yml
File metadata and controls
83 lines (71 loc) · 1.96 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Deploy Workers
on:
push:
branches: [main]
paths:
- "apps/auth-worker/**"
- "apps/mcp-worker/**"
- "packages/auth/**"
- ".github/workflows/deploy-workers.yml"
workflow_dispatch:
inputs:
worker:
description: "Worker to deploy"
required: true
type: choice
options:
- all
- auth-worker
- mcp-worker
concurrency:
group: deploy-workers
cancel-in-progress: false
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
auth-worker: ${{ steps.changes.outputs.auth-worker }}
mcp-worker: ${{ steps.changes.outputs.mcp-worker }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
auth-worker:
- 'apps/auth-worker/**'
- 'packages/auth/**'
mcp-worker:
- 'apps/mcp-worker/**'
deploy-auth-worker:
needs: detect-changes
if: |
needs.detect-changes.outputs.auth-worker == 'true' ||
github.event.inputs.worker == 'all' ||
github.event.inputs.worker == 'auth-worker'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install
- name: Deploy auth-worker
run: bun run deploy:auth
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
deploy-mcp-worker:
needs: detect-changes
if: |
needs.detect-changes.outputs.mcp-worker == 'true' ||
github.event.inputs.worker == 'all' ||
github.event.inputs.worker == 'mcp-worker'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install
- name: Deploy mcp-worker
run: bun run deploy:mcp
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}