-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.31 KB
/
functions-deploy.yml
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
39
40
41
42
43
44
45
46
47
48
name: Deploy Azure Function
on:
push:
paths:
- 'handlenett-backend/serverless/HttpTriggerTest/**'
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.x'
- name: Log in to Azure - App Registration Credentials
uses: azure/login@v1
with:
creds: |
{
"clientId": "${{ secrets.AZURE_CLIENT_ID_PUBLISH_AND_DEPLOY_AR }}",
"clientSecret": "${{ secrets.AZURE_SECRET_ID_PUBLISH_AND_DEPLOY_AR }}",
"subscriptionId": "${{ secrets.AZURE_SUBSCRIPTION_ID }}",
"tenantId": "${{ secrets.AZURE_TENANT_ID }}"
}
- name: Build the function app
run: dotnet publish -c Release -o ./publish
- name: Create deployment package
run: zip -r publish.zip ./publish
- name: Deploy to Azure Function App using Azure CLI
run: |
az functionapp deployment source config-zip \
--resource-group handlenett-rg \
--name handlenett-notifications-fa \
--src ./publish.zip
- name: Clean up published artifacts
run: rm -rf ./publish ./publish.zip