Skip to content
This repository was archived by the owner on Jun 9, 2026. It is now read-only.

docs(CLAUDE.pathfinder): update deploy instructions for CI/CD #7

docs(CLAUDE.pathfinder): update deploy instructions for CI/CD

docs(CLAUDE.pathfinder): update deploy instructions for CI/CD #7

Workflow file for this run

name: CI
on:
pull_request:
branches: [master]
push:
branches: [master]
jobs:
# TODO: re-enable test job once CI environment issues are resolved
# test:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
#
# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version: "3.11"
#
# - name: Install uv
# run: pip install uv
#
# - name: Install Python deps
# run: uv pip install --system ".[dev]"
#
# - name: Lint
# run: ruff check .
#
# - name: Format check
# run: ruff format --check .
#
# - name: Python tests
# run: pytest -x -q
#
# - name: Set up Node
# uses: actions/setup-node@v4
# with:
# node-version: "22"
#
# - name: Node tests
# run: node --test tests/*.test.js
deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' && 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-nanobanana:latest || true
docker tag ghcr.io/pmlabs-org/mcp-nanobanana:latest \
ghcr.io/pmlabs-org/mcp-nanobanana:previous || true
docker push ghcr.io/pmlabs-org/mcp-nanobanana:previous || true
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
ghcr.io/pmlabs-org/mcp-nanobanana:latest
ghcr.io/pmlabs-org/mcp-nanobanana:${{ 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 nanobanana \
&& docker compose up -d --force-recreate nanobanana"
- name: Health check
run: |
for i in 1 2 3 4 5; do
if curl -sf https://nanobanana.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