1
- # Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
2
- # More GitHub Actions for Azure: https://github.com/Azure/actions
3
-
4
1
name : Build and deploy ASP.Net Core app to Azure Web App - bdsagroup3chirpremotedb
5
2
3
+ env :
4
+ SIMPLEDB_NAME : Chirp.SimpleDB.csproj
5
+ AZURE_WEBAPP_NAME : bdsagroup3chirpremotedb
6
+ AZURE_WEBAPP_PACKAGE_PATH : ' ./src/Chirp.SimpleDB'
7
+
6
8
on :
7
9
push :
8
10
branches :
@@ -19,20 +21,20 @@ jobs:
19
21
- name : Set up .NET Core
20
22
uses : actions/setup-dotnet@v1
21
23
with :
22
- dotnet-version : ' 7.x '
24
+ dotnet-version : ' 7.0 '
23
25
include-prerelease : true
24
26
25
27
- name : Build with dotnet
26
- run : dotnet build --configuration Release
28
+ run : dotnet build ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} --configuration Release
27
29
28
30
- name : dotnet publish
29
- run : dotnet publish -c Release -o ${{env.DOTNET_ROOT}} /myapp
31
+ run : dotnet publish ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} -c Release -o '$GITHUB_WORKSPACE /myapp'
30
32
31
33
- name : Upload artifact for deployment job
32
34
uses : actions/upload-artifact@v2
33
35
with :
34
36
name : .net-app
35
- path : ${{env.DOTNET_ROOT}} /myapp
37
+ path : $GITHUB_WORKSPACE /myapp
36
38
37
39
deploy :
38
40
runs-on : ubuntu-latest
46
48
uses : actions/download-artifact@v2
47
49
with :
48
50
name : .net-app
51
+ path : $GITHUB_WORKSPACE/myapp
52
+
53
+ - name : Set up .NET Core
54
+ uses : actions/setup-dotnet@v1
55
+ with :
56
+ dotnet-version : ' 7.0'
57
+ include-prerelease : true
49
58
50
59
- name : Deploy to Azure Web App
51
60
id : deploy-to-webapp
54
63
app-name : ' bdsagroup3chirpremotedb'
55
64
slot-name : ' Production'
56
65
publish-profile : ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_735FC0BF9C604D6D891DF8D5723C66F0 }}
57
- package : .
66
+ package : $GITHUB_WORKSPACE/myapp
0 commit comments