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