Skip to content

Commit 74f65dc

Browse files
committed
ci: fix workflow
1 parent c0d4176 commit 74f65dc

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,13 @@ jobs:
3232
creds: ${{ secrets.AZURE_CREDENTIALS }}
3333
- name: Deploy to Azure
3434
run: |
35-
az webapp up -n "copilot-${{github.actor}}" -g "rg-copilot-nodejs-todo" --sku F1 --runtime "NODE|18-lts"
35+
# Create resource group rg-copilot-nodejs-todo
36+
az group create --name rg-copilot-nodejs-todo --location eastus
37+
# Create cosmosdb with default api
38+
az cosmosdb create --name copilot-nodejs-todo --resource-group rg-copilot-nodejs-todo
39+
# Deploy webapp using node 18
40+
az webapp up --sku F1 --name nodejs-todo-sinedied --resource-group rg-copilot-nodejs-todo --runtime "node|18-lts"
41+
# Retrieve cosmosdb connection string
42+
DATABASE_CONNECTION_STRING=$(az cosmosdb keys list --name copilot-nodejs-todo --resource-group rg-copilot-nodejs-todo --type connection-strings --query "connectionStrings[0].connectionString" -o tsv)
43+
# Set connection string in webapp
44+
az webapp config appsettings set --name nodejs-todo-sinedied --resource-group rg-copilot-nodejs-todo --settings DATABASE_CONNECTION_STRING=$DATABASE_CONNECTION_STRING

0 commit comments

Comments
 (0)