diff --git a/.github/workflows/build_and_push.yaml b/.github/workflows/build_push_deploy.yaml similarity index 58% rename from .github/workflows/build_and_push.yaml rename to .github/workflows/build_push_deploy.yaml index 9918ab3f1..9c476641d 100644 --- a/.github/workflows/build_and_push.yaml +++ b/.github/workflows/build_push_deploy.yaml @@ -1,4 +1,4 @@ -name: Build and Push Docker Image +name: Build Push and Deploy Docker Image on: release: @@ -23,3 +23,14 @@ jobs: with: push: true tags: shaunly/real_char:latest + + - name: Install and configure kubectl + uses: azure/setup-kubectl@v1 + with: + version: 'v1.20.0' + + - name: Deploy to Kubernetes + run: | + echo "${{ secrets.KUBECONFIG }}" | base64 --decode > ./kubeconfig.yaml + export KUBECONFIG=./kubeconfig.yaml + kubectl rollout restart deployment deployment/realchar-dev-deployment diff --git a/.github/workflows/react_build_and_push.yaml b/.github/workflows/react_build_push_deploy.yaml similarity index 70% rename from .github/workflows/react_build_and_push.yaml rename to .github/workflows/react_build_push_deploy.yaml index 0d925740a..e8cd082b5 100644 --- a/.github/workflows/react_build_and_push.yaml +++ b/.github/workflows/react_build_push_deploy.yaml @@ -1,4 +1,4 @@ -name: Build and Push Docker Image for Frontend +name: Build Push and Deploy Docker Image for Frontend on: release: @@ -28,3 +28,9 @@ jobs: file: ./client/web/Dockerfile push: true tags: shaunly/real_char_frontend:latest + + - name: Deploy to Kubernetes + run: | + echo "${{ secrets.KUBECONFIG }}" | base64 --decode > ./kubeconfig.yaml + export KUBECONFIG=./kubeconfig.yaml + kubectl rollout restart deployment deployment/react-dev-deployment