From 8ab9dc3cf730e8212e803ac5372f057be2af12ae Mon Sep 17 00:00:00 2001 From: GautamPatil Date: Sun, 7 Apr 2024 12:46:55 +0530 Subject: [PATCH] Added Continous Deployment to Kubernetes. --- .github/workflows/ci.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2825324..59a431c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,11 +30,10 @@ jobs: docker tag gautampatil1/rezume:latest ghcr.io/gautampatil1/rezume:latest docker push ghcr.io/gautampatil1/rezume:latest - - name: cluster restart - uses: appleboy/ssh-action@v1.0.3 - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - key: ${{ secrets.KEY }} - script: | - minikube start --driver=docker \ No newline at end of file + - name: SSH into instance and restart Minikube + run: | + ssh-keyscan -H ${{ secrets.HOST }} >> ~/.ssh/known_hosts + chmod 600 ~/.ssh/id_rsa + ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa ${{ secrets.USERNAME }}@${{ secrets.HOST }} "minikube start --driver=docker" + env: + SSH_AUTH_SOCK: /dev/null \ No newline at end of file