Skip to content

Register 15 previously-orphaned tool modules with FastMCP #16

Register 15 previously-orphaned tool modules with FastMCP

Register 15 previously-orphaned tool modules with FastMCP #16

Workflow file for this run

name: CI
# re-enable trigger for meta ads
on:
push:
branches: [ main, sync-upstream ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build image
uses: docker/build-push-action@v6
with:
context: .
push: false
cache-from: type=gha
cache-to: type=gha,mode=max
deploy:
runs-on: ubuntu-latest
needs: build
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/sync-upstream') && github.event_name == 'push'
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Tag previous image for rollback
run: |
docker pull ghcr.io/pmlabs-org/mcp-meta-ads:latest || true
docker tag ghcr.io/pmlabs-org/mcp-meta-ads:latest \
ghcr.io/pmlabs-org/mcp-meta-ads:previous || true
docker push ghcr.io/pmlabs-org/mcp-meta-ads:previous || true
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
ghcr.io/pmlabs-org/mcp-meta-ads:latest
ghcr.io/pmlabs-org/mcp-meta-ads:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Setup SSH agent
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.DEPLOY_SSH_KEY }}
- name: Add droplet to known hosts
run: ssh-keyscan -H ${{ secrets.DEPLOY_HOST }} >> ~/.ssh/known_hosts
- name: Deploy to droplet
run: |
ssh ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }} \
"cd /opt/pmin-mcpinfrastructure \
&& docker compose pull meta-ads \
&& docker compose up -d --force-recreate meta-ads"
- name: Health check
run: |
for i in 1 2 3 4 5; do
if curl -sf https://meta-ads.mcp.pathfindermarketing.com.au/.well-known/oauth-authorization-server > /dev/null; then
echo "Health check passed"; exit 0
fi
echo "Attempt $i/5 — retrying in 15s..."; sleep 15
done
echo "Health check failed"; exit 1