Skip to content

Commit

Permalink
#173 fix: Deploy to dev수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hye-on committed Sep 23, 2024
1 parent 0678e20 commit bbbb7d8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/cicd_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ jobs:
- name: Build with Gradle
run: ./gradlew clean build

- name: docker image build
run: docker build -t togetupdev/togetupdev .

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
Expand All @@ -69,6 +66,7 @@ jobs:

- name: Docker push
run: |
docker build -t ${{ secrets.DOCKER_HUB_USERNAME }}/togetupdev .
docker push ${{ secrets.DOCKER_HUB_USERNAME }}/togetupdev
- name: Deploy to dev
Expand All @@ -79,7 +77,8 @@ jobs:
key: ${{ secrets.EC2_SSH_KEY_DEV }}
port: ${{ secrets.EC2_SSH_PORT }}
script: |
sudo docker pull ${{ secrets.DOCKER_HUB_USERNAME }}/${{ secrets.DOCKER_HUB_REPO_DEV}}
sudo docker ps -qa | grep -q . && sudo docker rm -f $(docker ps -qa)
sudo docker pull ${{ secrets.DOCKER_HUB_USERNAME }}/togetupdev
docker-compose up -d
sudo docker image prune -f
Expand Down

0 comments on commit bbbb7d8

Please sign in to comment.