-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (36 loc) · 1.01 KB
/
dev.yml
File metadata and controls
43 lines (36 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
32
33
34
35
36
37
38
39
40
41
42
43
name: Deploy Dev
on:
push:
branches:
- 'release/**'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
- name: Build app
run: ./gradlew build -x test
- name: Copy build to server
uses: appleboy/scp-action@v0.1.7
with:
host: ${{ secrets.DO_SSH_HOST }}
username: ${{ secrets.DO_SSH_USER }}
key: ${{ secrets.DO_SSH_KEY }}
source: "build/libs/*.jar"
target: "/opt/cuoco/dev/backend"
- name: Restart app on server
uses: appleboy/ssh-action@v0.1.10
with:
host: ${{ secrets.DO_SSH_HOST }}
username: ${{ secrets.DO_SSH_USER }}
key: ${{ secrets.DO_SSH_KEY }}
script: |
cd /opt/cuoco/dev/backend
docker compose down
docker compose up -d --build