Skip to content

Commit 4c2baea

Browse files
devallibusclaude
andcommitted
ci: add deploy-mcp job for production and development branches
Automate MCP Cloudflare Worker deploys via CI instead of manual wrangler deploy. Pushes to master deploy production, pushes to development deploy a staging worker (shaderbase-mcp-dev) pointed at the Railway dev environment. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5dec98a commit 4c2baea

3 files changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/validate.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
push:
66
branches:
77
- master
8+
- development
89

910
jobs:
1011
check:
@@ -91,6 +92,34 @@ jobs:
9192
# - run: cd apps/web && bun install --frozen-lockfile && bun run build
9293
# # Deploy to Railway or Fly.io when ready
9394

95+
deploy-mcp:
96+
needs: check
97+
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/development')
98+
runs-on: ubuntu-latest
99+
steps:
100+
- name: Checkout
101+
uses: actions/checkout@v4
102+
103+
- name: Setup Node.js
104+
uses: actions/setup-node@v4
105+
with:
106+
node-version: 22
107+
108+
- name: Setup Bun
109+
uses: oven-sh/setup-bun@v2
110+
with:
111+
bun-version: 1.3.8
112+
113+
- name: Install Dependencies
114+
run: bun install --frozen-lockfile
115+
116+
- name: Deploy MCP Worker
117+
uses: cloudflare/wrangler-action@v3
118+
with:
119+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
120+
workingDirectory: packages/mcp
121+
command: deploy ${{ github.ref == 'refs/heads/development' && '--env development' || '--env=""' }}
122+
94123
publish-cli:
95124
needs: check
96125
if: github.ref == 'refs/heads/master' && github.event_name == 'push'

packages/mcp/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
"private": true,
55
"type": "module",
66
"scripts": {
7+
"dev": "wrangler dev",
8+
"deploy": "wrangler deploy",
9+
"deploy:dev": "wrangler deploy --env development",
710
"test": "node --experimental-strip-types src/handlers.test.ts"
811
},
912
"dependencies": {

packages/mcp/wrangler.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,11 @@ compatibility_date = "2026-03-01"
44

55
[vars]
66
REGISTRY_URL = "https://registry.shaderbase.com"
7+
WEB_APP_URL = "https://shaderbase.com"
8+
9+
[env.development]
10+
name = "shaderbase-mcp-dev"
11+
12+
[env.development.vars]
13+
REGISTRY_URL = "https://registry.shaderbase.com"
14+
WEB_APP_URL = "https://blissful-acceptance-development.up.railway.app"

0 commit comments

Comments
 (0)