Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/main_dvizzle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy ASP.Net Core app to Azure Web App - dvizzle

on:
push:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: windows-latest
permissions:
contents: read #This is required for actions/checkout

steps:
- uses: actions/checkout@v4

- name: Set up .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'

- name: Build with dotnet
run: dotnet build --configuration Release

- name: dotnet publish
run: dotnet publish -c Release -o "${{env.DOTNET_ROOT}}/myapp"

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v4
with:
name: .net-app
path: ${{env.DOTNET_ROOT}}/myapp

deploy:
runs-on: windows-latest
needs: build
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v4
with:
name: .net-app

- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v3
with:
app-name: 'dvizzle'
slot-name: 'Production'
package: .
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_2A3F2CE2ABB94ED6BD988DF2BFE73169 }}
2 changes: 1 addition & 1 deletion Pages/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}

<div class="text-center">
<h1 class="display-4">Hello World from .NET 8</h1>
<h1 class="display-4">Hello World from such .NET 8. It is a bit fickle - This is a test</h1>
<p>Learn about <a href="https://docs.microsoft.com/aspnet/core">building Web apps with ASP.NET Core</a>.</p>
<hr />
<div>Host operating system: @Model.OSVersion</div>
Expand Down
24 changes: 24 additions & 0 deletions dotnetcore-docs-hello-world.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.2.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dotnetcoresample", "dotnetcoresample.csproj", "{180973BF-4C71-7ED8-4C86-DDE572554104}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{180973BF-4C71-7ED8-4C86-DDE572554104}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{180973BF-4C71-7ED8-4C86-DDE572554104}.Debug|Any CPU.Build.0 = Debug|Any CPU
{180973BF-4C71-7ED8-4C86-DDE572554104}.Release|Any CPU.ActiveCfg = Release|Any CPU
{180973BF-4C71-7ED8-4C86-DDE572554104}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6863E8FD-1B05-4C50-9391-4AC4A5A69B37}
EndGlobalSection
EndGlobal