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
29 changes: 29 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy KeteMart NZ Web App

on:
push:
branches: [ main ]

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup .NET 6
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'

- name: Build & Publish
run: |
dotnet restore
dotnet build --configuration Release --no-restore
dotnet publish --configuration Release --no-restore -o ./output

- name: Deploy to Azure
uses: azure/webapps-deploy@v3
with:
app-name: ketemart-web-1762828796
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE }}
package: ./output
2 changes: 1 addition & 1 deletion Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
}

<div class="text-center">
<h1 class="display-4">Welcome</h1>
<h1 class="display-4">WeKeteMart Online Store - LIVE FROM NZ!</h1>
<p>Learn about <a href="https://docs.microsoft.com/aspnet/core">building Web apps with ASP.NET Core</a>.</p>
</div>
3 changes: 2 additions & 1 deletion appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"MyDbConnection": "Server=(localdb)\\mssqllocaldb;Database=MyDatabaseContext-2085246d-aff5-4310-a0b8-93780358cdae;Trusted_Connection=True;MultipleActiveResultSets=true"
"DefaultConnection": "Server=tcp:ketemart-sqlserver.database.windows.net,1433;Initial Catalog=ketemart-db;Persist Security Info=False;User ID=sqladmin;Password=SuperSecret123!;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"
}
}
}
24 changes: 24 additions & 0 deletions dotnetcore-sqldb-tutorial.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}") = "DotNetCoreSqlDb", "DotNetCoreSqlDb.csproj", "{08FB2A99-2756-1200-CC0E-9886891113A0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{08FB2A99-2756-1200-CC0E-9886891113A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{08FB2A99-2756-1200-CC0E-9886891113A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{08FB2A99-2756-1200-CC0E-9886891113A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{08FB2A99-2756-1200-CC0E-9886891113A0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {84AB6B7A-CC2B-40FB-99DC-77FEEA8913C3}
EndGlobalSection
EndGlobal