Restructuing

This commit is contained in:
2026-07-05 16:30:58 -04:00
parent 678e20d402
commit 7b0f2ce1a5
767 changed files with 354 additions and 76 deletions
+4 -4
View File
@@ -1,15 +1,15 @@
using System.Diagnostics;
var deployDir = Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, "..", "..", ".."));
var webDir = Path.GetFullPath(Path.Combine(deployDir, "..", "Web"));
var webProject = Path.Combine(webDir, "Web.csproj");
var webDir = Path.GetFullPath(Path.Combine(deployDir, "..", "Standalone"));
var webProject = Path.Combine(webDir, "Standalone.csproj");
var publishDir = Path.Combine(Path.GetTempPath(), "chrono-deploy", Guid.NewGuid().ToString());
var deploymentToken = Environment.GetEnvironmentVariable("Chrono_DeployToken") ??
throw new InvalidOperationException("Chrono_DeployToken environment variable not set.");
var deployEnv = Environment.GetEnvironmentVariable("Chrono_DeployEnv") ?? "preview";
// 1. Publish
Console.WriteLine("Publishing Web project...");
Console.WriteLine("Publishing Standalone project...");
Run("dotnet", $"publish \"{webProject}\" -c Release -o \"{publishDir}\"");
var wwwroot = Path.Combine(publishDir, "wwwroot");
@@ -20,7 +20,7 @@ if (!Directory.Exists(wwwroot))
}
// 2. Deploy
Console.WriteLine("Deploying to Azure Static Web Apps...");
Console.WriteLine("Deploying to Azure Static Standalone Apps...");
Run("swa.cmd",
$"deploy \"{wwwroot}\" --deployment-token \"{deploymentToken}\" --app-location \"{webDir}\" --env \"{deployEnv}\"");