Skip to content

Commit 6192fd5

Browse files
DevOps: Deployments fixed for simple db (#35)
1 parent dd799af commit 6192fd5

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

.github/workflows/main_bdsagroup3chirpremotedb.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
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-
41
name: Build and deploy ASP.Net Core app to Azure Web App - bdsagroup3chirpremotedb
52

3+
env:
4+
SIMPLEDB_NAME: Chirp.SimpleDB.csproj
5+
AZURE_WEBAPP_NAME: bdsagroup3chirpremotedb
6+
AZURE_WEBAPP_PACKAGE_PATH: './src/Chirp.SimpleDB'
7+
68
on:
79
push:
810
branches:
@@ -19,20 +21,20 @@ jobs:
1921
- name: Set up .NET Core
2022
uses: actions/setup-dotnet@v1
2123
with:
22-
dotnet-version: '7.x'
24+
dotnet-version: '7.0'
2325
include-prerelease: true
2426

2527
- name: Build with dotnet
26-
run: dotnet build --configuration Release
28+
run: dotnet build ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} --configuration Release
2729

2830
- 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'
3032

3133
- name: Upload artifact for deployment job
3234
uses: actions/upload-artifact@v2
3335
with:
3436
name: .net-app
35-
path: ${{env.DOTNET_ROOT}}/myapp
37+
path: $GITHUB_WORKSPACE/myapp
3638

3739
deploy:
3840
runs-on: ubuntu-latest
@@ -46,6 +48,13 @@ jobs:
4648
uses: actions/download-artifact@v2
4749
with:
4850
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
4958

5059
- name: Deploy to Azure Web App
5160
id: deploy-to-webapp
@@ -54,4 +63,4 @@ jobs:
5463
app-name: 'bdsagroup3chirpremotedb'
5564
slot-name: 'Production'
5665
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_735FC0BF9C604D6D891DF8D5723C66F0 }}
57-
package: .
66+
package: $GITHUB_WORKSPACE/myapp

0 commit comments

Comments
 (0)