1414}
1515
1616var serverDir = Path . Combine ( repoRoot , "server" ) ;
17- var wwwrootDir = Path . Combine ( serverDir , "Docs.Web" , "wwwroot" ) ;
17+ var wwwrootDir = Path . Combine ( serverDir , "src" , " Docs.Web", "wwwroot" ) ;
1818
1919// Target names
2020const string Restore = "restore" ;
2121const string AstroBuild = "astro-build" ;
2222const string DotnetBuild = "dotnet-build" ;
23+ const string DotnetTest = "dotnet-test" ;
2324const string DotnetPublish = "dotnet-publish" ;
2425const string Build = "build" ;
2526const string Container = "container" ;
@@ -60,20 +61,25 @@ await RunAsync("docker",
6061Target ( DotnetBuild , dependsOn : [ Restore ] , ( ) =>
6162 RunAsync ( "dotnet" , "build Docs.slnx --no-restore" , workingDirectory : serverDir ) ) ;
6263
64+ Target ( DotnetTest , dependsOn : [ DotnetBuild ] , ( ) =>
65+ RunAsync ( "dotnet" , "test Docs.slnx --no-build" , workingDirectory : serverDir ) ) ;
66+
6367Target ( DotnetPublish , dependsOn : [ Restore ] , ( ) =>
64- RunAsync ( "dotnet" , "publish Docs.Web/Docs.Web.csproj -c Release --no-restore" ,
68+ RunAsync ( "dotnet" , "publish src/ Docs.Web/Docs.Web.csproj -c Release --no-restore" ,
6569 workingDirectory : serverDir ) ) ;
6670
6771Target ( Build , dependsOn : [ AstroBuild , DotnetBuild ] ) ;
6872
73+ Target ( Default , dependsOn : [ Build , DotnetTest ] ) ;
74+
6975// Container (no Dockerfile needed!)
7076Target ( Container , dependsOn : [ AstroBuild ] , ( ) =>
71- RunAsync ( "dotnet" , "publish Docs.Web/Docs.Web.csproj -c Release /t:PublishContainer" ,
77+ RunAsync ( "dotnet" , "publish src/ Docs.Web/Docs.Web.csproj -c Release /t:PublishContainer" ,
7278 workingDirectory : serverDir ) ) ;
7379
7480// Dev
7581Target ( Aspire , ( ) =>
76- RunAsync ( "dotnet" , "run --project Docs.AppHost" , workingDirectory : serverDir ) ) ;
82+ RunAsync ( "dotnet" , "run --project src/ Docs.AppHost" , workingDirectory : serverDir ) ) ;
7783
7884// Quality - Link check builds Astro; actual lychee runs in CI workflow due to secrets
7985Target ( LinkCheck , dependsOn : [ AstroBuild ] , ( ) =>
@@ -91,6 +97,4 @@ await RunAsync("docker",
9197 Directory . Delete ( wwwrootDir , recursive : true ) ;
9298} ) ;
9399
94- Target ( Default , dependsOn : [ Build ] ) ;
95-
96100await RunTargetsAndExitAsync ( args ) ;
0 commit comments