-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (32 loc) · 1.12 KB
/
nerdostat-api.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
name: Build and deploy .NET Core Function App to Azure functions app
on:
push:
branches:
- main
env:
AZURE_FUNCTIONAPP_NAME: nerdostat-api
AZURE_FUNCTIONAPP_PACKAGE_PATH: api/publish
CONFIGURATION: Release
DOTNET_CORE_VERSION: 6.0.x
WORKING_DIRECTORY: api
jobs:
build-and-deploy:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_CORE_VERSION }}
- name: Restore
run: dotnet restore "${{ env.WORKING_DIRECTORY }}"
- name: Build
run: dotnet build "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-restore
- name: Publish
run: dotnet publish "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-build --output "${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}"
- name: Deploy to Azure Function App
uses: Azure/functions-action@v1
with:
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
publish-profile: ${{ secrets.nerdostat_api_969f }}
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}