Skip to content

Commit

Permalink
feat : Update be-autodeploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeTH916 authored Jan 28, 2024
1 parent df09328 commit 39eeb54
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/be-autodeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,15 @@ jobs:
needs: push_to_registry
runs-on: ubuntu-latest
steps:
- 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 : |
- 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 -vvv -i ~/.ssh/id_rsa.pem ubuntu@${{ secrets.DEV_HOST }} 'echo "Connected to EC2 Instance"'
docker pull ${{ secrets.NCP_CONTAINER_REGISTRY }}/nibobnebob
docker stop my_was_container
docker rm my_was_container
Expand Down

0 comments on commit 39eeb54

Please sign in to comment.