Skip to content

Commit

Permalink
Update gradle.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
eojinny authored Nov 29, 2023
1 parent 4e69826 commit 50916d9
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

jobs:
build:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -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:
Expand All @@ -50,7 +52,7 @@
port: ${{ secrets.PORT }}
source: "./docker-compose-contents.yml"
target: "/home/ec2-user/"

- name: Deploy
uses: appleboy/ssh-action@master
with:
Expand Down

0 comments on commit 50916d9

Please sign in to comment.