diff --git a/.github/workflows/azure-deploy.yml b/.github/workflows/azure-deploy.yml index a054ef1a..d87f562e 100644 --- a/.github/workflows/azure-deploy.yml +++ b/.github/workflows/azure-deploy.yml @@ -53,7 +53,8 @@ jobs: nuxtAuthPrimaryUserFlow="${{ secrets.NUXT_AUTH_PRIMARY_USER_FLOW }}" nuxtAzureOpenaiApiKey="${{ secrets.NUXT_AZURE_OPENAI_API_KEY }}" nuxtAzureOpenaiApiVersion="${{ secrets.NUXT_AZURE_OPENAI_API_VERSION }}", - nuxtAzureOpenaiEndpoint="${{ secrets.NUXT_AZURE_OPENAI_ENDPOINT }}" + nuxtAzureOpenaiEndpoint="${{ secrets.NUXT_AZURE_OPENAI_ENDPOINT }}", + nuxtAzureOpenaiDeploymentId="${{ secrets.NUXT_AZURE_OPENAI_DEPLOYMENT_ID }}" scope: 'resourcegroup' deploymentMode: 'Incremental' failOnStdErr: false @@ -105,6 +106,7 @@ jobs: echo "NUXT_AZURE_OPENAI_API_KEY=${{secrets.NUXT_AZURE_OPENAI_API_KEY}}" >> .env echo "NUXT_AZURE_OPENAI_API_VERSION=${{secrets.NUXT_AZURE_OPENAI_API_VERSION}}" >> .env echo "NUXT_AZURE_OPENAI_ENDPOINT=${{secrets.NUXT_AZURE_OPENAI_ENDPOINT}}" >> .env + echo "NUXT_AZURE_OPENAI_DEPLOYMENT_ID=${{secrets.NUXT_AZURE_OPENAI_DEPLOYMENT_ID}}" >> .env - name: Build Application run: npm run build - name: Generate PWA Assets @@ -160,7 +162,8 @@ jobs: nuxtAuthPrimaryUserFlow="${{ secrets.NUXT_AUTH_PRIMARY_USER_FLOW }}" nuxtAzureOpenaiApiKey="${{ secrets.NUXT_AZURE_OPENAI_API_KEY }}" nuxtAzureOpenaiApiVersion="${{ secrets.NUXT_AZURE_OPENAI_API_VERSION }}", - nuxtAzureOpenaiEndpoint="${{ secrets.NUXT_AZURE_OPENAI_ENDPOINT }}" + nuxtAzureOpenaiEndpoint="${{ secrets.NUXT_AZURE_OPENAI_ENDPOINT }}", + nuxtAzureOpenaiDeploymentId="${{ secrets.NUXT_AZURE_OPENAI_DEPLOYMENT_ID }}" scope: 'resourcegroup' failOnStdErr: false - name: logout @@ -232,6 +235,7 @@ jobs: echo "NUXT_AZURE_OPENAI_API_KEY=${{secrets.NUXT_AZURE_OPENAI_API_KEY}}" >> .env echo "NUXT_AZURE_OPENAI_API_VERSION=${{secrets.NUXT_AZURE_OPENAI_API_VERSION}}" >> .env echo "NUXT_AZURE_OPENAI_ENDPOINT=${{secrets.NUXT_AZURE_OPENAI_ENDPOINT}}" >> .env + echo "NUXT_AZURE_OPENAI_DEPLOYMENT_ID=${{secrets.NUXT_AZURE_OPENAI_DEPLOYMENT_ID}}" >> .env - name: Login to Azure uses: azure/login@v2 with: diff --git a/azure/bicep/main.bicep b/azure/bicep/main.bicep index 87baae6c..f11fd0e9 100644 --- a/azure/bicep/main.bicep +++ b/azure/bicep/main.bicep @@ -49,6 +49,8 @@ param nuxtAzureOpenaiApiKey string param nuxtAzureOpenaiApiVersion string @secure() param nuxtAzureOpenaiEndpoint string +@secure() +param nuxtAzureOpenaiDeploymentId string module appInsights './modules/appInsights.bicep' = { name: 'appInsights' @@ -100,5 +102,6 @@ module appService './modules/appService.bicep' = { nuxtAzureOpenaiApiKey: nuxtAzureOpenaiApiKey nuxtAzureOpenaiApiVersion: nuxtAzureOpenaiApiVersion nuxtAzureOpenaiEndpoint: nuxtAzureOpenaiEndpoint + nuxtAzureOpenaiDeploymentId: nuxtAzureOpenaiDeploymentId } } diff --git a/azure/bicep/modules/appService.bicep b/azure/bicep/modules/appService.bicep index b6f2c835..18458b2e 100644 --- a/azure/bicep/modules/appService.bicep +++ b/azure/bicep/modules/appService.bicep @@ -46,6 +46,8 @@ param nuxtAzureOpenaiApiKey string param nuxtAzureOpenaiApiVersion string @secure() param nuxtAzureOpenaiEndpoint string +@secure() +param nuxtAzureOpenaiDeploymentId string resource appServicePlan 'Microsoft.Web/serverfarms@2023-12-01' = { name: toLower('plan-${name}') @@ -197,6 +199,10 @@ resource appService 'Microsoft.Web/sites@2023-12-01' = { name: 'NUXT_AZURE_OPENAI_ENDPOINT' value: nuxtAzureOpenaiEndpoint } + { + name: 'NUXT_AZURE_OPENAI_DEPLOYMENT_ID' + value: nuxtAzureOpenaiDeploymentId + } ] } } diff --git a/components/WorkboxDataView.vue b/components/WorkboxDataView.vue index 0d12cae7..e7e5f865 100644 --- a/components/WorkboxDataView.vue +++ b/components/WorkboxDataView.vue @@ -1,8 +1,8 @@