Skip to content

fixes enabling dapr on frontend #12

fixes enabling dapr on frontend

fixes enabling dapr on frontend #12

Workflow file for this run

name: Frontend CICD
on:
push:
branches:
[ main ]
paths:
- "app/frontend/KnowledgeBase.Frontend/**"
- "app/frontend/knowledgebasefrontendchart/**"
workflow_dispatch:
env:
AKS_NAMESPACE: sk-rag-demo
SERVICE_NAME: frontend
SERVICE_PATH: frontend
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout to the branch
uses: actions/checkout@v2
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: ACR Login
run: |
az acr login --name ${{ secrets.AZURE_CONTAINER_REGISTRY }}
- name: Build image
run: |
cd ./app
docker build -t ${{ secrets.AZURE_CONTAINER_REGISTRY }}/${{ env.SERVICE_NAME }}:latest -f ./${{ env.SERVICE_PATH }}/*/Dockerfile .
- name: Push image to Azure Container Registry
run: |
docker push ${{ secrets.AZURE_CONTAINER_REGISTRY }}/${{ env.SERVICE_NAME }}:latest
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout to the branch
uses: actions/checkout@v2
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Merge AKS Context
run: |
az aks get-credentials --name ${{ secrets.AZURE_AKS_CLUSTER }} --resource-group ${{ secrets.AZURE_AKS_RESOURCE_GROUP }}
- name: Deploy Helm Chart
run: |
cd ./app
helm upgrade --install ${{ env.SERVICE_NAME }}chart ./${{ env.SERVICE_PATH }}/${{ env.SERVICE_NAME }}chart --namespace ${{ env.AKS_NAMESPACE }}
- name: Update Deployment
run: |
kubectl rollout restart deployment ${{ env.SERVICE_NAME }} --namespace ${{ env.AKS_NAMESPACE }}