Skip to content

Commit

Permalink
feat : Update be-autodeploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
GeunH authored Jan 28, 2024
1 parent e1c62b6 commit df09328
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/be-autodeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,14 @@ jobs:
needs: push_to_registry
runs-on: ubuntu-latest
steps:
- name: Set up SSH key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa.pem
chmod 600 ~/.ssh/id_rsa.pem
- name: SSH Connection to EC2 Instance
run: |
ssh -o "StrictHostKeyChecking=no" -i ~/.ssh/id_rsa.pem ubuntu@${{ secrets.DEV_HOST }} 'echo "Connected to EC2 Instance"'
- name: connect ssh to WAS server
uses: appleboy/ssh-action@master
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
host: ${{ secrets.DEV_HOST }}
username: ${{ secrets.DEV_USERNAME }}
port: 22
script : |
docker pull ${{ secrets.NCP_CONTAINER_REGISTRY }}/nibobnebob
docker stop my_was_container
docker rm my_was_container
Expand Down

0 comments on commit df09328

Please sign in to comment.