Skip to content

Commit e9207e9

Browse files
committed
[CHORE] CICD 스크립트 수정
1 parent 3384e35 commit e9207e9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/cicd.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,20 @@ jobs:
9898
id: deploy-prod
9999
with:
100100
host: ${{ secrets.SSH_KNOWN_HOSTS }} # EC2 퍼블릭 IPv4 DNS
101-
username: ${{secrets.SSH_USER}}
101+
username: ${{ secrets.SSH_USER }}
102102
key: ${{ secrets.SSH_PEM_KEY }}
103103
envs: GITHUB_SHA
104-
run: |
104+
script: |
105105
echo "Stopping and removing existing Docker containers..."
106106
sudo docker rm -f $(sudo docker ps -aq) || echo "No containers to remove"
107-
107+
108108
echo "Pulling the latest Docker image..."
109109
sudo docker pull ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPO }}
110-
110+
111111
echo "Starting deployment with Docker Compose..."
112-
113112
cd ~
114113
sudo docker-compose up -d --build
115-
114+
116115
echo "Cleaning up unused Docker images..."
117116
sudo docker image prune -f || echo "No images to prune"
117+

0 commit comments

Comments
 (0)