Skip to content

Commit

Permalink
Fix: 스크립트 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
mingeun.kim committed Oct 19, 2024
1 parent ce9049f commit e9b410d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/ncp-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,17 @@ jobs:
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.NCP_DEV_SSH_KEY }}
known_hosts: ${{ secrets.NCP_DEV_KNOWN_HOSTS }}
key: ${{ secrets.SERVER_SSH_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}

- name: Install sshpass
run: sudo apt-get install sshpass

- name: Connect SSH and Deploy
env:
SSH_PASSWORD: ${{ secrets.NCP_DEV_PASSWORD }}
run: |
ssh -o StrictHostKeyChecking=no root@${{ secrets.NCP_DEV_HOST }} << EOF
sshpass -p "$SSH_PASSWORD" ssh -o StrictHostKeyChecking=no root@${{ secrets.NCP_DEV_HOST }} << EOF
docker pull ${{ secrets.NCP_CONTAINER_REGISTRY }}/${{ env.PROJECT_NAME }}:latest
docker stop ${{ env.PROJECT_NAME }} || true
docker rm ${{ env.PROJECT_NAME }} || true
Expand Down

0 comments on commit e9b410d

Please sign in to comment.