-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (41 loc) · 1.2 KB
/
cd.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
41
42
43
44
name: Node.js CD
on:
push:
branches: [ "main", "dev" ]
jobs:
build:
runs-on: ubuntu-latest
environment: main
steps:
- name: deploy to vps using ssh
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
port: 22
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
key: ${{ secrets.PRIVATE_KEY }}
script: |
cd ~/.apps/zannime
git pull
git status
sudo docker compose -f docker-compose.yaml build
sudo docker compose -f docker-compose.yaml up -d
dev-build:
runs-on: ubuntu-latest
environment: main
steps:
- name: deploy to vps using ssh for dev
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
port: 22
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
key: ${{ secrets.PRIVATE_KEY }}
script: |
cd ~/.apps/zannime-dev
git pull
git status
sudo docker compose -f docker-compose-dev.yaml build
sudo docker compose -f docker-compose-dev.yaml up -d