Skip to content
52 changes: 52 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: .NET

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Publish
run: dotnet publish -c Release -o website
- name: Upload artifact for deployment job
uses: actions/[email protected]
with:
name: webapp
path: website/**
if-no-files-found: warn
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download a Build Artifact
uses: actions/[email protected]
with:
name: webapp
path: webapp
- name: Deploy web app
uses: azure/webapps-deploy@v2
with:
app-name: GitHubApp-44192085
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: webapp

2 changes: 1 addition & 1 deletion Views/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<header>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
<div class="container">
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">pipelines_dotnet_core</a>
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">pipelines_dotnet_core v2.0</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
Expand Down