Skip to content

Merge pull request #6 from KingKong26/dev #1

Merge pull request #6 from KingKong26/dev

Merge pull request #6 from KingKong26/dev #1

Workflow file for this run

name: deploy-client
on:
push:
branches:
- main
paths:
- 'client/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: cd client && docker build -t vishnumohanan/client .
- run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
- run: docker push vishnumohanan/client
- name: Authenticate with Google Cloud
uses: 'google-github-actions/auth@v2'
with:
credentials_json: ${{ secrets.GKE_SA_KEY }}
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v2
with:
version: "latest"
project_id: ${{ secrets.GKE_PROJECT_ID }}
- name: Install gke-gcloud-auth-plugin
run: gcloud components install gke-gcloud-auth-plugin
- name: Configure kubectl
run: gcloud container clusters get-credentials ${{secrets.GKE_CLUSTER_NAME}} --region=${{secrets.GKE_REGION}} --project=${{ secrets.GKE_PROJECT_ID }}
- run: kubectl rollout restart deployment client-depl