generated from blgorman/DN6SimpleWebWithAuth
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbetter-azure-deploy.yaml
40 lines (34 loc) · 1.01 KB
/
better-azure-deploy.yaml
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
name: Deploy DN6 Web using ubuntu
on:
push:
branches:
- main
workflow_dispatch:
env:
AZURE_WEBAPP_NAME: dn6redisdemolive20220516
jobs:
build-and-deploy:
name: 'Build And Deploy to Azure'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: 'Set up .NET Core'
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: 'Install Dependencies'
run: dotnet restore
- name: 'Build with dotnet'
run: dotnet build --configuration Release
- name: 'Test'
run: dotnet test --no-restore --verbosity normal
- name: 'dotnet publish'
run: |
dotnet publish -c Release -o dotnetcorewebapp
- name: 'Deploy to Azure WebApp'
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
slot-name: 'Production'
publish-profile: ${{ secrets.YOUR_APP_PUBLISH_PROFILE_SECRET_HERE }}
package: './dotnetcorewebapp'