From 50916d933c2f53f9dc6e147f82207dfe5c7bff8b Mon Sep 17 00:00:00 2001 From: eojinny <96863137+eojinny@users.noreply.github.com> Date: Wed, 29 Nov 2023 14:05:36 +0900 Subject: [PATCH] Update gradle.yml --- .github/workflows/gradle.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 48ff4ef..1557e2d 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -11,7 +11,6 @@ jobs: build: - runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -20,27 +19,30 @@ with: java-version: '17' distribution: 'temurin' - + + - name: Clean Gradle Cache + run: ./gradlew clean + - name: Make application.yml run: | mkdir -p src/main/resources echo "$APPLICATION" > src/main/resources/application.yml env: APPLICATION: ${{ secrets.APPLICATION }} - + - name: Grant execute permission for gradlew run: chmod +x gradlew - + - name: Build with Gradle run: ./gradlew build -x test - + - name: Docker build run: | docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} docker build -t app . docker tag app ${{ secrets.DOCKER_USERNAME }}/contents:latest docker push ${{ secrets.DOCKER_USERNAME }}/contents:latest - + - name: docker-compose.yml uses: appleboy/scp-action@master with: @@ -50,7 +52,7 @@ port: ${{ secrets.PORT }} source: "./docker-compose-contents.yml" target: "/home/ec2-user/" - + - name: Deploy uses: appleboy/ssh-action@master with: