-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (26 loc) · 908 Bytes
/
Copy pathdeploy.yml
File metadata and controls
31 lines (26 loc) · 908 Bytes
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
name: Auto Deploy Chatbot to Production
on:
workflow_run:
workflows: ["Sanity Checks & Auto Merge to Main"]
types:
- completed
jobs:
deploy:
runs-on: self-hosted
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Execute Remote SSH Commands
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
echo "Moving to Application Directory..."
cd /opt/bookstack-mcp
echo "Pulling latest changes from Git..."
git pull origin main
echo "Rebuilding and restarting Docker containers..."
docker compose down
docker compose up --build -d
echo "Deployment Complete!"