From 6b5bb27ff6f30f5d288ca6001c1ec98104bfa915 Mon Sep 17 00:00:00 2001 From: Mathew Alex Date: Mon, 13 Feb 2023 03:14:44 +0530 Subject: [PATCH] updated nagaland deploy --- .github/workflows/deploy.yaml | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 865700edd5a..1a87592e2f2 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -383,3 +383,45 @@ jobs: cd kube/deployments/ sed -i -e "s/_BUILD_NUMBER_/${GITHUB_RUN_NUMBER}/g" care-fe.yaml kubectl apply -f care-fe.yaml + + deploy-production-nagaland: + needs: build-production + name: Deploy to GKE Nagaland + runs-on: ubuntu-latest + environment: + name: Production - Nagaland + url: https://care.nagaland.gov.in + steps: + - name: Checkout Kube Config + uses: actions/checkout@v3 + with: + repository: coronasafe/nl-care-infra + token: ${{ secrets.GIT_ACCESS_TOKEN }} + path: kube + ref: main + + # Setup gcloud CLI + - uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7 + with: + service_account_key: ${{ secrets.GKE_SA_KEY }} + project_id: ${{ secrets.GKE_PROJECT }} + + # Get the GKE credentials, so we can deploy to the cluster + - uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e + with: + cluster_name: ${{ secrets.GKE_CLUSTER }} + location: ${{ secrets.GKE_ZONE }} + credentials: ${{ secrets.GKE_SA_KEY }} + + - name: install kubectl + uses: azure/setup-kubectl@v2.0 + with: + version: "v1.23.6" + id: install + + - name: Deploy Care Fe Production + run: | + mkdir -p $HOME/.kube/ + cd kube/deployments/ + sed -i -e "s/_BUILD_NUMBER_/${GITHUB_RUN_NUMBER}/g" care-fe.yaml + kubectl apply -f care-fe.yaml