File tree Expand file tree Collapse file tree 1 file changed +64
-0
lines changed Expand file tree Collapse file tree 1 file changed +64
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy to Azure
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ push :
6
+ branches :
7
+ - main
8
+ paths :
9
+ - ' Demo/**'
10
+ - ' Src/**'
11
+ - ' .github/workflows/azure-deploy.yml'
12
+
13
+ env :
14
+ # Setting these variables allows .NET CLI to use rich color codes in console output
15
+ TERM : xterm
16
+ DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION : true
17
+ # Skip boilerplate output
18
+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE : true
19
+ DOTNET_NOLOGO : true
20
+ DOTNET_CLI_TELEMETRY_OPTOUT : true
21
+
22
+ jobs :
23
+ build-and-deploy :
24
+ runs-on : ubuntu-latest
25
+ permissions :
26
+ contents : read
27
+
28
+ steps :
29
+ - name : Checkout
30
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
31
+
32
+ - name : Install .NET
33
+ uses : actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # v4.3.0
34
+ with :
35
+ dotnet-version : " 8.0.x"
36
+
37
+ - name : Run restore
38
+ run : dotnet restore Demo/Demo.csproj
39
+
40
+ - name : Run build
41
+ run : >
42
+ dotnet build Demo/Demo.csproj
43
+ --no-restore
44
+ --configuration Release
45
+
46
+ - name : Run tests
47
+ run : >
48
+ dotnet test Tests/Fido2.Tests/Fido2.Tests.csproj
49
+ --configuration Release
50
+ --logger "trx;LogFileName=test-results.trx"
51
+
52
+ - name : Publish application
53
+ run : >
54
+ dotnet publish Demo/Demo.csproj
55
+ --no-restore
56
+ --no-build
57
+ --configuration Release
58
+ --output ./publish
59
+
60
+ - name : Deploy to Azure Web App
61
+ uses : azure/webapps-deploy@v3
62
+ with :
63
+ package : ./publish
64
+ publish-profile : ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
You can’t perform that action at this time.
0 commit comments