diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..23102f1c --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,29 @@ +name: Deploy KeteMart NZ + +on: + push: + branches: [ main ] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '6.0.x' + + - name: Build & Publish + run: | + dotnet restore + dotnet build --no-restore -c Release + dotnet publish --no-restore -c Release -o output + + - name: Deploy to Azure + uses: azure/webapps-deploy@v3 + with: + app-name: ketemart-web-1762828796 + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE }} + package: output diff --git a/Views/Home/Index.cshtml b/Views/Home/Index.cshtml index d2d19bdf..0b76a769 100644 --- a/Views/Home/Index.cshtml +++ b/Views/Home/Index.cshtml @@ -3,6 +3,6 @@ }
-

Welcome

+

WeKeteMart Online Store - LIVE FROM NZ!

Learn about building Web apps with ASP.NET Core.

diff --git a/appsettings.json b/appsettings.json index efa2435c..df4d7585 100644 --- a/appsettings.json +++ b/appsettings.json @@ -6,6 +6,6 @@ }, "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;" } } \ No newline at end of file diff --git a/dotnetcore-sqldb-tutorial.sln b/dotnetcore-sqldb-tutorial.sln new file mode 100644 index 00000000..0a4bcd87 --- /dev/null +++ b/dotnetcore-sqldb-tutorial.sln @@ -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