Skip to content

Commit

Permalink
Merge branch 'MicrosoftLearning:main' into upgrade-ado-tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenvandiemen authored May 7, 2024
2 parents b0ade7b + b2a54c9 commit 116776d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/eshoponweb-cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ jobs:
- name: Test with dotnet
run: dotnet test ./eShopOnWeb.sln --configuration Release
- name: dotnet publish
run: dotnet publish ./src/Web/Web.csproj -c Release -o ${{env.DOTNET_ROOT}}/myapp
run: |
dotnet publish ./src/Web/Web.csproj -c Release -o ${{env.DOTNET_ROOT}}/myapp
zip -r app.zip ${{env.DOTNET_ROOT}}/myapp
# upload the published website code artifacts
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v4
with:
name: .net-app
path: ${{env.DOTNET_ROOT}}/myapp
path: app.zip

# upload the bicep template as artifacts for next job
- name: Upload artifact for deployment job
Expand Down Expand Up @@ -85,8 +87,18 @@ jobs:
failOnStdErr: false

# Publish website to Azure App Service (WebApp)
# Step disabled due to issue where the site sometimes can't be found: https://github.com/microsoft/pipelines-appservice-lib/issues/56. Instead deploy using CLI
- name: Publish Website to WebApp
if: false #Disable step due to comment above
uses: Azure/webapps-deploy@v3
with:
type: ZIP
app-name: ${{ env.WEBAPP-NAME }}
package: .net-app
package: .net-app/app.zip

# Publish website to Azure App Service using CLI (WebApp)
- name: Publish Website to WebApp
uses: Azure/cli@v2
with:
inlineScript: |
az webapp deploy --name ${{ env.WEBAPP-NAME }} --resource-group ${{ env.RESOURCE-GROUP }} --src-path .net-app/app.zip --type zip
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
<PackageVersion Include="Ardalis.Specification" Version="8.0.0" />
<PackageVersion Include="Ardalis.ListStartupServices" Version="1.1.4" />
<PackageVersion Include="Azure.Extensions.AspNetCore.Configuration.Secrets" Version="1.3.1" />
<PackageVersion Include="Azure.Identity" Version="1.11.0" />
<PackageVersion Include="Azure.Identity" Version="1.11.2" />
<PackageVersion Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" />
<PackageVersion Include="BlazorInputFile" Version="0.2.0" />
<PackageVersion Include="Blazored.LocalStorage" Version="4.5.0" />
<PackageVersion Include="BuildBundlerMinifier" Version="3.2.449" PrivateAssets="All" />
<PackageVersion Include="FluentValidation" Version="11.9.0" />
<PackageVersion Include="FluentValidation" Version="11.9.1" />
<PackageVersion Include="MediatR" Version="12.2.0" />
<PackageVersion Include="Microsoft.AspNetCore.Components.Authorization" Version="8.0.4" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.4" />
Expand Down

0 comments on commit 116776d

Please sign in to comment.