forked from microsoft/CopilotStudioSamples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·38 lines (30 loc) · 953 Bytes
/
Copy pathdeploy.sh
File metadata and controls
executable file
·38 lines (30 loc) · 953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
# Deploy script for SyncToAsyncService Azure Function
# Variables
RESOURCE_GROUP="rg-copilotstudio-connector"
LOCATION="eastus"
STORAGE_ACCOUNT="stcopilot$(openssl rand -hex 4)"
FUNCTION_APP="func-synctoasync-$(openssl rand -hex 4)"
# Login to Azure
az login
# Create resource group
az group create --name $RESOURCE_GROUP --location $LOCATION
# Create storage account
az storage account create \
--name $STORAGE_ACCOUNT \
--location $LOCATION \
--resource-group $RESOURCE_GROUP \
--sku Standard_LRS
# Create function app
az functionapp create \
--resource-group $RESOURCE_GROUP \
--consumption-plan-location $LOCATION \
--runtime node \
--runtime-version 20 \
--functions-version 4 \
--name $FUNCTION_APP \
--storage-account $STORAGE_ACCOUNT
# Build and deploy
npm run build
func azure functionapp publish $FUNCTION_APP
echo "Function deployed to: https://$FUNCTION_APP.azurewebsites.net/api/SyncToAsyncService"