forked from existence-master/Sentient
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (29 loc) · 1.01 KB
/
deploy-dev-backend.yaml
File metadata and controls
31 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
name: Deploy Backend to Development
on:
push:
branches:
- development
paths:
- "src/server/**"
- ".github/workflows/deploy-dev-backend.yaml"
jobs:
deploy:
name: Deploy Backend to Dev VM
runs-on: ubuntu-latest
steps:
- name: Deploy over SSH
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.DEV_SERVER_VM_HOST }}
username: ${{ secrets.DEV_SERVER_VM_USER }}
key: ${{ secrets.DEV_SERVER_VM_SSH_PRIVATE_KEY }}
script: |
set -e
cd ~/sentient
git pull origin development
cd src/server
echo "Building and deploying the backend..."
docker compose down
docker compose up --build -d
echo "Cleaning up old Docker images..."
docker image prune -f