diff --git a/.github/workflows/be-autodeploy.yml b/.github/workflows/be-autodeploy.yml index d789754..6deb2a6 100644 --- a/.github/workflows/be-autodeploy.yml +++ b/.github/workflows/be-autodeploy.yml @@ -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