Skip to content

Commit 082e61f

Browse files
committed
Update CI/CD workflow to include source project path for build and publish steps
1 parent b6a218b commit 082e61f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/cicd.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ permissions:
88

99
env:
1010
AZURE_WEBAPP_NAME: app-gh-aspnet-webapp-01 # set this to your application's name
11+
SRC_PROJECT_PATH: '/webapp01/webapp01.csproj'
1112
AZURE_WEBAPP_PACKAGE_PATH: './src' # set this to the path to your web app project, defaults to the repository root
1213
DOTNET_VERSION: '9.0.x' # set this to the dot net version to use
1314

@@ -28,9 +29,9 @@ jobs:
2829
# Run dotnet build and publish
2930
- name: dotnet build and publish
3031
run: |
31-
dotnet restore ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/webapp01.csproj
32-
dotnet build --configuration Release ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/webapp01.csproj
33-
dotnet publish -c Release --property:PublishDir='${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/publish' ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/webapp01.csproj
32+
dotnet restore ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}{{ env.SRC_PROJECT_PATH }}
33+
dotnet build --configuration Release ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}{{ env.SRC_PROJECT_PATH }}
34+
dotnet publish -c Release --property:PublishDir='${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/publish' ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}{{ env.SRC_PROJECT_PATH }}
3435
3536
- name: Azure Login
3637
uses: azure/login@v2

0 commit comments

Comments
 (0)