Skip to content

Commit

Permalink
Feat: 배포 스크립트 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
TGoddessana committed Dec 22, 2024
1 parent 18a3fe3 commit 0a4835f
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ jobs:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
- name: JDK 17 준비
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
- name: Gradle 준비
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582
- name: Build with Gradle Wrapper
- name: 빌드
env:
DB_URL: ${{ secrets.DB_URL }}
DB_USERNAME: ${{ secrets.DB_USERNAME }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
run: ./gradlew build
- name: Upload Build Artifact
- name: 빌드 결과물 업로드
uses: actions/upload-artifact@v4
with:
name: umpa-backend-${{ github.sha }}
Expand All @@ -39,17 +39,17 @@ jobs:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
- name: JDK 17 준비
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Download Build Artifact
- name: 빌드 결과물 다운로드
uses: actions/download-artifact@v4
with:
name: umpa-backend-${{ github.sha }}
path: ./build/libs
- name: Send Build to Remote Server
path: ./build/libs/*.jar
- name: SCP 파일 전송
uses: appleboy/[email protected]
with:
host: ${{ secrets.SERVER_IP }}
Expand All @@ -58,13 +58,3 @@ jobs:
key: ${{ secrets.SERVER_KEY }}
source: ./build/libs
target: ~/umpa/umpa-backend
- name: Deploy to Remote Server using SSH
uses: appleboy/[email protected]
with:
host: ${{ secrets.SERVER_IP }}
username: ${{ secrets.SERVER_USER }}
port: ${{ secrets.SERVER_PORT }}
key: ${{ secrets.SERVER_KEY }}
script: |
cd ~/umpa/umpa-backend
./gradlew bootRun

0 comments on commit 0a4835f

Please sign in to comment.