Skip to content

Commit

Permalink
chore: cd 업데이트
Browse files Browse the repository at this point in the history
  • Loading branch information
GiHoo committed Apr 8, 2024
1 parent 7516566 commit d6d7591
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ jobs:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USERNAME }}
key: ${{ secrets.EC2_SSH_PRIVATE_KEY }}
port: ${{ secrets.EC2_PORT }}
envs: GITHUB_SHA
script: |
whoami
docker stop caps-api
docker rm caps-api
sudo docker pull ${{ secrets.DOCKER_ID }}/${{ secrets.DOCKER_REPO }}
docker run -d --name caps-api -p 8080:8080 ${{ secrets.DOCKER_ID }}/${{ secrets.DOCKER_REPO }}
docker rmi $(docker images -a | grep "<none>" | awk '{print $3}')

0 comments on commit d6d7591

Please sign in to comment.