Skip to content

Commit 2c8e1fa

Browse files
refactor: Update deployment environment variables and adjust resource deployment parameters
1 parent 4af96ad commit 2c8e1fa

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

.github/workflows/deploy.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@ on:
44
push:
55
branches:
66
- main
7+
- fix-deploy-pipeline
78
schedule:
89
- cron: '0 9,21 * * *' # Runs at 9:00 AM and 9:00 PM GMT
910

11+
env:
12+
GPT_MIN_CAPACITY: 10
13+
TEXT_EMBEDDING_MIN_CAPACITY: 10
14+
1015
jobs:
1116
deploy:
1217
runs-on: ubuntu-latest
@@ -30,8 +35,8 @@ jobs:
3035
export AZURE_TENANT_ID=${{ secrets.AZURE_TENANT_ID }}
3136
export AZURE_CLIENT_SECRET=${{ secrets.AZURE_CLIENT_SECRET }}
3237
export AZURE_SUBSCRIPTION_ID="${{ secrets.AZURE_SUBSCRIPTION_ID }}"
33-
export GPT_MIN_CAPACITY="30"
34-
export TEXT_EMBEDDING_MIN_CAPACITY="30"
38+
export GPT_MIN_CAPACITY=${{ env.GPT_MIN_CAPACITY }}
39+
export TEXT_EMBEDDING_MIN_CAPACITY=${{ env.TEXT_EMBEDDING_MIN_CAPACITY }}
3540
export AZURE_REGIONS="${{ vars.AZURE_REGIONS }}"
3641
3742
chmod +x scripts/checkquota.sh
@@ -114,17 +119,17 @@ jobs:
114119
--template-file infra/main.json \
115120
--parameters \
116121
environmentName="${{ env.SOLUTION_PREFIX }}" \
117-
secondaryLocation="eastus2" \
122+
secondaryLocation="northcentralus" \
118123
deploymentType="GlobalStandard" \
119124
gptModelName="gpt-4o" \
120125
azureOpenaiAPIVersion="2024-05-01-preview" \
121-
gptDeploymentCapacity="10" \
126+
gptDeploymentCapacity=${{ env.GPT_MIN_CAPACITY }} \
122127
embeddingModel="text-embedding-ada-002" \
123-
embeddingDeploymentCapacity="30" \
128+
embeddingDeploymentCapacity=${{ env.TEXT_EMBEDDING_MIN_CAPACITY }} \
124129
imageTag="latest"
125130
126131
- name: Extract AI Services and Key Vault Names
127-
if: always()
132+
if: always() && steps.check_create_rg.outcome == 'success'
128133
run: |
129134
echo "Fetching AI Services and Key Vault names before deletion..."
130135
@@ -145,7 +150,7 @@ jobs:
145150
echo "AI_SERVICES=$AI_SERVICES" >> $GITHUB_ENV
146151

147152
- name: Delete Bicep Deployment
148-
if: success()
153+
if: always()
149154
run: |
150155
set -e
151156
echo "Checking if resource group exists..."
@@ -162,6 +167,7 @@ jobs:
162167
fi
163168
164169
- name: Wait for Resource Deletion to Complete
170+
if: always()
165171
run: |
166172
echo "Waiting for all deployed resources (including AI Services) to be deleted..."
167173

0 commit comments

Comments
 (0)