Skip to content

Commit

Permalink
fix: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
GayeongKimm committed Jun 24, 2024
1 parent d638ded commit 9cbbaf0
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,15 @@ jobs:
uses: appleboy/ssh-action@master
id: deploy-prod
with:
host: ${{ secrets.HOST_PROD }} # EC2 퍼블릭 IPv4 DNS
host: ${{ secrets.HOST_PROD }}
username: ubuntu
key: ${{ secrets.PRIVATE_KEY }} # EC2 private key
port: ${{ secrets.PORT }} #ssh port (22)
key: ${{ secrets.PRIVATE_KEY }}
port: ${{ secrets.PORT }}
envs: GITHUB_SHA
script: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker stop clock
docker rm clock
docker rmi ${{ secrets.DOCKER_USERNAME }}/clock:latest
docker stop clock || true
docker rm clock || true
docker rmi ${{ secrets.DOCKER_USERNAME }}/clock:latest
docker pull ${{ secrets.DOCKER_USERNAME }}/clock:latest
docker run -d -p 80:8080 --name clock \
-e DB_URL=${{ secrets.DB_URL }} \
-e DB_USERNAME=${{ secrets.DB_USERNAME }} \
-e DB_PASSWORD=${{ secrets.DB_PASSWORD }} \
${{ secrets.DOCKER_USERNAME }}/clock:latest
docker run -d -p 80:8080 --name alimo ${{ secrets.DOCKER_USERNAME }}/alimo:latest

0 comments on commit 9cbbaf0

Please sign in to comment.