-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (29 loc) · 1.01 KB
/
deploy.yml
File metadata and controls
38 lines (29 loc) · 1.01 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
name: Deploy to VPS
on:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy to VPS
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.VPS_HOST }}
username: ${{ secrets.VPS_USERNAME }}
key: ${{ secrets.VPS_SSH_KEY }}
script: |
cd ~/ocp-server
# Pull latest configuration changes
git pull origin main
# Pull latest images from GHCR
docker compose pull
# Restart services (pulls new images if needed)
docker compose up -d
# Clean up old images
docker image prune -f
# Show running containers
docker compose ps
echo "Deployment complete!"
echo "Services available at:"
echo " - https://opencontextprotocol.io"
echo " - https://opencontextprotocol.io/api/v1/registry"