Skip to content

Commit

Permalink
Added CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mnlx committed Nov 16, 2023
1 parent 8a55075 commit 7a0d38f
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/ui-deploy-azure-aks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@
name: Deploy UI to Azure AKS
on:
push:
branches: ["release", "main"]
branches: ["release", "main", "add-correct-cicd-wf"]
workflow_dispatch:
inputs:
environment:
description: 'Select the env'
type: environment
required: true

jobs:
run:
runs-on: ubuntu-latest
environment: 'production'
env:
ENV_NAME: 'production'
environment: ${{ github.ref == 'main' && isEmpty(inputs.environment) && 'production' || 'production' }} # TODO: change last production to staging
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand All @@ -37,15 +40,15 @@ jobs:
- name: Make envfile
uses: SpicyPizza/[email protected]
with:
envkey_VITE_API_URL: ${{ secrets.VITE_API_URL }}
envkey_VITE_AUTH0_STATUS: ${{ secrets.VITE_AUTH0_STATUS }}
envkey_VITE_API_URL: ${{ vars.VITE_API_URL }}
envkey_VITE_AUTH0_STATUS: ${{ vars.VITE_AUTH0_STATUS }}
envkey_VITE_AUTH0_DOMAIN: ${{ secrets.VITE_AUTH0_DOMAIN }}
envkey_VITE_AUTH0_CLIENT_ID: ${{ secrets.VITE_AUTH0_CLIENT_ID }}
envkey_VITE_AUTH0_AUDIENCE: ${{ secrets.VITE_AUTH0_AUDIENCE }}
file_name: .env.${{ env.ENV_NAME }}
file_name: .env.${{ inputs.environment }}

- name: Build
run: npm run build:${{ env.ENV_NAME }}
run: npm run build:${{ inputs.environment }}

- name: Upload to blob storage
uses: azure/CLI@v1
Expand All @@ -58,7 +61,6 @@ jobs:
--destination-path ${{vars.APPLICATION_NAME}} \
--overwrite
# We have to use the replica trick since our nodes only have 1 GPU
- name: Kubernetes Deployment
run: |
kubectl -n ${{vars.KUBERNETES_NAMESPACE}} rollout restart deployment/${{vars.APPLICATION_NAME}}
Expand Down

0 comments on commit 7a0d38f

Please sign in to comment.