-
Notifications
You must be signed in to change notification settings - Fork 4
84 lines (70 loc) · 2.57 KB
/
Copy pathdeploy.yml
File metadata and controls
84 lines (70 loc) · 2.57 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
84
name: Deploy MCPs (Production)
on:
workflow_dispatch:
push:
branches:
- main
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
mcps: ${{ steps.detect.outputs.mcps }}
has_changes: ${{ steps.detect.outputs.has_changes }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Need full history for git diff
- name: Set up Bun
uses: oven-sh/setup-bun@v2
- name: Detect changed MCPs
id: detect
run: |
# Get the previous commit to compare against
PREVIOUS_COMMIT="${{ github.event.before }}"
# Detect changed MCPs
CHANGED_MCPS=$(bun run scripts/detect-changed-mcps.ts "$PREVIOUS_COMMIT" HEAD)
echo "Changed MCPs: $CHANGED_MCPS"
# Set outputs
echo "mcps=$CHANGED_MCPS" >> $GITHUB_OUTPUT
# Check if array is not empty
if [ "$CHANGED_MCPS" = "[]" ]; then
echo "has_changes=false" >> $GITHUB_OUTPUT
else
echo "has_changes=true" >> $GITHUB_OUTPUT
fi
deploy:
needs: detect-changes
if: needs.detect-changes.outputs.has_changes == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
mcp: ${{ fromJSON(needs.detect-changes.outputs.mcps) }}
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Bun
uses: oven-sh/setup-bun@v2
- name: Install Deco CLI
run: bun install -g deco-cli
- name: Deploy ${{ matrix.mcp }}
run: bun run scripts/deploy.ts ${{ matrix.mcp }}
env:
DECO_DEPLOY_TOKEN: ${{ secrets.DECO_DEPLOY_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
GOOGLE_GENAI_API_KEY: ${{ secrets.GOOGLE_GENAI_API_KEY }}
NANOBANANA_API_KEY: ${{ secrets.NANOBANANA_API_KEY }}
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
PINECONE_TOKEN: ${{ secrets.PINECONE_TOKEN }}
PINECONE_INDEX: ${{ secrets.PINECONE_INDEX }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
APIFY_API_TOKEN: ${{ secrets.APIFY_API_TOKEN }}
REPLICATE_API_TOKEN: ${{ secrets.REPLICATE_API_TOKEN }}
PERPLEXITY_API_KEY: ${{ secrets.PERPLEXITY_API_KEY }}
- name: Notify success
if: success()
run: echo "✅ Successfully deployed ${{ matrix.mcp }} to production"
- name: Notify failure
if: failure()
run: echo "❌ Failed to deploy ${{ matrix.mcp }}"