Skip to content

Commit 266bc95

Browse files
committed
Merge branch 'develop' of https://github.com/WhosInRoom/WhosInServer into feat/#3-Jwt-login
2 parents cde1ec9 + 9441e7b commit 266bc95

2 files changed

Lines changed: 68 additions & 0 deletions

File tree

.github/workflows/CD.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CD
2+
3+
on:
4+
push:
5+
branches: [ "develop" ]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-24.04
10+
11+
steps:
12+
- name: checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Set up JDK 17
16+
uses: actions/setup-java@v4
17+
with:
18+
distribution: 'corretto'
19+
java-version: '17'
20+
21+
- name: build
22+
run: |
23+
chmod +x gradlew
24+
./gradlew build -x test
25+
26+
- name: Copy jar to EC2
27+
uses: appleboy/scp-action@v0.1.7
28+
with:
29+
host: ${{ secrets.EC2_HOST }}
30+
username: ${{ secrets.EC2_USER }}
31+
key: ${{ secrets.EC2_SSH_KEY }}
32+
source: "build/libs/*SNAPSHOT.jar"
33+
target: "/home/ubuntu/app/"
34+
35+
- name: Restart app on EC2
36+
uses: appleboy/ssh-action@v0.1.10
37+
with:
38+
host: ${{ secrets.EC2_HOST }}
39+
username: ${{ secrets.EC2_USER }}
40+
key: ${{ secrets.EC2_SSH_KEY }}
41+
script: |
42+
sudo systemctl daemon-reload
43+
sudo systemctl restart whois-server

.github/workflows/CI.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [ "develop" ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-24.04
10+
11+
12+
steps:
13+
- name: checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Set up JDK 17
17+
uses: actions/setup-java@v4
18+
with:
19+
distribution: 'corretto'
20+
java-version: '17'
21+
22+
- name: build
23+
run: |
24+
chmod +x gradlew
25+
./gradlew build -x test

0 commit comments

Comments
 (0)