Skip to content

Commit

Permalink
feat: 배포 스크립트에 flyway 커맨드 전 JDK 설정 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
holyPigeon committed Dec 4, 2024
1 parent 5e9ce84 commit 35b54c4
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,30 @@ jobs:
source: ./manifest/spring-redis.yml
target: ~/spring-redis

- uses: actions/checkout@v3 # repo에 있는 파일들 self-host 머신에 복제
- name: Set up JDK 17 # jdk 셋업 17로 해야되나??
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
check-latest: true

- name: Setup Build with Gradle # gradle 셋업
uses: gradle/gradle-build-action@v2
with:
gradle-version: current
arguments: build # Gradle의 'build' 태스크를 실행

# Flyway를 사용하여 데이터베이스 스키마 변경을 적용
- name: Run Database Migration # 새로운 마이그레이션 스크립트를 실행
run: ./gradlew flywayMigrate
env:
SPRING_PROFILES_ACTIVE: cd
DB_HOST: ${{ secrets.DB_HOST }}
DB_USERNAME: root
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
DB_URL: jdbc:mysql://${{ secrets.DB_HOST }}:3306/teampu

- name: Connect to GCP with SSH
uses: appleboy/[email protected]
with:
Expand Down

0 comments on commit 35b54c4

Please sign in to comment.