Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

경북대 BE_김동현 6주차 과제 (2-3단계) #302

Merged
merged 38 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
df9dd0c
setUp: 지난 주차 코드 옮겨옴
donghyuun Jul 29, 2024
6c2fb36
fix: 중복되는 카테고리 이름 확인 메서드 수정
donghyuun Jul 29, 2024
b3c3d1f
refactor: Product API 리펙토링
donghyuun Jul 29, 2024
7236d34
refactor: Option API 리펙토링
donghyuun Jul 29, 2024
7a34090
refactor: 폴더명 변경 Member->member
donghyuun Jul 29, 2024
5dc6ac7
refactor: 도메인 이름 변경 CartItem->Wish
donghyuun Jul 30, 2024
1eb3820
refactor: (Member) API 명세서 기준으로 변경
donghyuun Jul 30, 2024
bc43158
refactor: (Category) API 명세서 기준으로 변경
donghyuun Jul 30, 2024
f387696
refactor: (Product) API 명세서 기준으로 변경
donghyuun Jul 30, 2024
62d64bf
refactor: (Option) API 명세서 기준으로 변경
donghyuun Jul 30, 2024
7e08430
refactor: (Wish) API 명세서 기준으로 변경
donghyuun Jul 30, 2024
f168658
refactor: (Order) API 명세서 기준으로 변경
donghyuun Jul 31, 2024
d84251d
refactor: (KaKao) API 명세서 기준으로 변경
donghyuun Jul 31, 2024
3911cf6
refactor: 변경 API 기준으로 html 수정
donghyuun Jul 31, 2024
da70ff1
refactor: 주문 메서드 설명 변경
donghyuun Jul 31, 2024
1a46509
refactor: Merge 충돌 사항 해결
donghyuun Jul 31, 2024
80d98c8
refactor: 카카오 로그인 매핑 URL 변경
donghyuun Aug 1, 2024
5db07ae
refactor: 프론트엔드 테스트를 위해 더미데이터 수정
donghyuun Aug 1, 2024
cd24b7c
feat: 포인트 조회, 충전, 주문 시 포인트 사용&적립
donghyuun Aug 2, 2024
2c99c37
feat: Order(Many)-Product(One) 으로 변경, 주문 관련 리팩토링
donghyuun Aug 2, 2024
9e3ee8e
docs: ReadMe 수정
donghyuun Aug 2, 2024
059df9a
setup: deploy.yml 작성
donghyuun Aug 2, 2024
ebeda60
setup: deploy.yml 수정
donghyuun Aug 2, 2024
c3eb597
feat: deploy.yml 수정
donghyuun Aug 2, 2024
adc7518
feat: deploy.yml 수정
donghyuun Aug 2, 2024
7e3ae51
setup: deploy.yml 수정
donghyuun Aug 2, 2024
a16aac7
setup: deploy.yml 수정
donghyuun Aug 2, 2024
9bd4a86
setup: deploy.yml 수정
donghyuun Aug 2, 2024
03590ac
setup: deploy.yml 수정
donghyuun Aug 2, 2024
40207a1
setup: deploy.yml 수정
donghyuun Aug 2, 2024
9d93282
setup: deploy.yml 수정
donghyuun Aug 2, 2024
4ddf9c6
setup: deploy.yml 수정
donghyuun Aug 2, 2024
71cc93b
setup: deploy.yml 수정
donghyuun Aug 2, 2024
709a30f
setup: deploy.yml 수정
donghyuun Aug 2, 2024
3f7a1b3
setup: deploy.yml 수정
donghyuun Aug 2, 2024
0d030e3
setup: deploy.yml 수정
donghyuun Aug 2, 2024
9846638
setup: deploy.yml 수정
donghyuun Aug 2, 2024
2f00199
setup: deploy.yml 수정
donghyuun Aug 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Deploy Spring Boot Application
MangKyu marked this conversation as resolved.
Show resolved Hide resolved

on:
workflow_dispatch:
push:
branches:
- step2-3 # 배포할 브랜치 이름

jobs:
deploy:
runs-on: ubuntu-latest
MangKyu marked this conversation as resolved.
Show resolved Hide resolved

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '21'

- run: touch ./src/main/resources/application.properties
- run: echo "${{ secrets.APPLICATION_KEY_PROPERTIES }}" > ./src/main/resources/application-key.properties

- name: Build Spring Boot application
run: ./gradlew build -x test # Gradle build 수행

- name: Verify JAR file location
run: ls -l ./build/libs/spring-gift-0.0.1-SNAPSHOT.jar

- name: Upload JAR file to remote server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.REMOTE_SSH_HOST }}
username: ${{ secrets.REMOTE_SSH_USERNAME }}
key: ${{ secrets.REMOTE_SSH_KEY }}
port: ${{ secrets.REMOTE_SSH_PORT }}
source: "./build/libs/spring-gift-0.0.1-SNAPSHOT.jar" # 빌드된 JAR 파일을
target: "/home/ubuntu/katecam" # 원격 서버의 디렉토리에 옮김

- name: Restart Spring Boot application on remote server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.REMOTE_SSH_HOST }}
username: ${{ secrets.REMOTE_SSH_USERNAME }}
key: ${{ secrets.REMOTE_SSH_KEY }}
port: ${{ secrets.REMOTE_SSH_PORT }}
script: |
#!/bin/bash
set -e

# 디렉토리 변경
cd /home/ubuntu/katecam/build/libs || { echo "Failed to change directory. Exiting."; exit 1; }

# 디렉토리 내용 확인
echo "Contents of the directory:"
ls -l

# 새로운 JAR 파일 이름 변경
echo "Renaming new JAR file..."
mv spring-gift-0.0.1-SNAPSHOT.jar spring-gift.jar

# 새로운 JAR 파일 실행
echo "Starting new JAR file..."
nohup java -jar spring-gift.jar > spring-gift.log 2>&1 &

# 테스트
echo "after starting new jar file..."
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# spring-gift-order
# spring-gift-point

## 기능 구현

61 changes: 0 additions & 61 deletions src/main/java/gift/domain/cartItem/CartItemController.java

This file was deleted.

122 changes: 0 additions & 122 deletions src/main/java/gift/domain/cartItem/CartItemRestController.java

This file was deleted.

110 changes: 0 additions & 110 deletions src/main/java/gift/domain/cartItem/CartItemService.java

This file was deleted.

25 changes: 0 additions & 25 deletions src/main/java/gift/domain/cartItem/JpaCartItemRepository.java

This file was deleted.

Loading