Skip to content

Commit

Permalink
cicd : git actions ์ˆ˜์ •
Browse files Browse the repository at this point in the history
  • Loading branch information
cowboysj committed Nov 13, 2024
1 parent dc54f28 commit 34c14aa
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/dev-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ jobs:
with:
context: .
push: true
tags: ${{ steps.metadata.outputs.tags }}
tags:
${{ secrets.DOCKER_USERNAME }}/shoot:latest
${{ secrets.DOCKER_USERNAME }}/shoot:${{ github.sha }}

- name: Deploy on EC2
uses: appleboy/ssh-action@master
Expand All @@ -67,11 +69,7 @@ jobs:
port: 22
script: |
cd /home/ubuntu
# ์ตœ์‹  ์ด๋ฏธ์ง€๋ฅผ pull
sudo docker pull ${{ secrets.DOCKER_USERNAME }}/shoot:latest
# ๊ธฐ์กด ์ปจํ…Œ์ด๋„ˆ ๋‚ด๋ฆฌ๊ธฐ
docker pull ${{ secrets.DOCKER_USERNAME }}/shoot:latest
docker-compose down
# ์ด๋ฏธ์ง€ ๊ฐ•์ œ ๋นŒ๋“œ (์บ์‹œ ๋ฌดํšจํ™”)
docker-compose build --no-cache
# ์ตœ์‹  ์ด๋ฏธ์ง€๋กœ ์ƒˆ ์ปจํ…Œ์ด๋„ˆ ์ƒ์„ฑ
docker-compose up -d --force-recreate
docker-compose build
docker-compose up -d

0 comments on commit 34c14aa

Please sign in to comment.