-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (36 loc) · 1.08 KB
/
deploy.yaml
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
39
40
name: Build and Deploy to Server
on:
push:
branches:
- master # Adjust the branch as needed
jobs:
deploy-to-solar-guardian:
runs-on: ubuntu-latest
steps:
- name: SSH and Deploy
uses: appleboy/[email protected]
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD }}
port: 22
script: |
cd devsoc-backend-24/
git pull origin master
sudo -S docker compose down
sudo -S docker compose up -d --build
deploy-to-midnight-sentinel:
runs-on: ubuntu-latest
steps:
- name: SSH and Deploy
uses: appleboy/[email protected]
with:
host: ${{ secrets.SERVER_HOST_2 }}
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD_2 }}
port: 22
script: |
cd devsoc-backend-24/
git pull origin master
sudo -S docker compose down
sudo -S docker compose up -d --build