Skip to content

Commit

Permalink
Update gradle.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
moonjin-kim authored Mar 13, 2024
1 parent e3f6120 commit 2b31e6f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ jobs:
- name: Build with Gradle
run: ./gradlew bootJar

- name: Build and Push Docker image
- name: web docker build and push
run: |
docker-compose build
docker-compose up -d
docker login -u ${{ secrets.DOCKER_ID }} -p ${{ secrets.DOCKER_PASSWORD }}
docker build -t ${{ secrets.DOCKER_REPO }}/planit-server .
docker push ${{ secrets.DOCKER_REPO }}/planit-server
- name: Deploy to EC2
uses: appleboy/ssh-action@master
Expand All @@ -43,5 +44,7 @@ jobs:
username: ${{ secrets.EC2_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
docker-compose down
sudo docker rm -f $(docker ps -qa)
sudo docker pull ${{ secrets.DOCKER_REPO }}/planit-server
docker-compose up -d
docker image prune -f

0 comments on commit 2b31e6f

Please sign in to comment.