Skip to content

Commit b154f50

Browse files
committed
Need to use --no-launch-profile to prevent it from using the Development profile in launchSettings.json
1 parent a5a0691 commit b154f50

File tree

3 files changed

+2
-16
lines changed

3 files changed

+2
-16
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ jobs:
6161
if [ ! -z "$site_base_href" ]
6262
then
6363
echo "Prerendering for deployment to $site_base_href"
64-
dotnet run --AppTasks=prerender --configuration Release --environment Production --BaseHref "$site_base_href"
64+
dotnet run --no-launch-profile --AppTasks=prerender --configuration Release --environment Production --BaseHref "$site_base_href"
6565
else
6666
echo "Prerendering for deployment to $(cat ./wwwroot/CNAME)"
67-
dotnet run --AppTasks=prerender --configuration Release --environment Production
67+
dotnet run --no-launch-profile --AppTasks=prerender --configuration Release --environment Production
6868
fi
6969
7070
# Deploy UI to GitHub Pages

MyApp/Configure.AppHost.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,6 @@ public void Configure(IWebHostBuilder builder) => builder
1515
context.Configuration.GetSection(nameof(AppConfig)).Bind(AppConfig.Instance);
1616
services.AddSingleton(AppConfig.Instance);
1717
});
18-
19-
public override void Configure()
20-
{
21-
SetConfig(new HostConfig {
22-
#if DEBUG
23-
DebugMode = true,
24-
#else
25-
DebugMode = false,
26-
#endif
27-
});
28-
}
2918
}
3019

3120
public class AppConfig

MyApp/Configure.Ssg.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ public void Configure(IWebHostBuilder builder) => builder
6565
#else
6666
Console.WriteLine($"Prerendering !DEBUG {env}:{appHost.Config.DebugMode}...");
6767
#endif
68-
69-
// Force production mode
70-
appHost.Config.DebugMode = false;
7168

7269
appHost.Resolve<MarkdownMeta>().RenderToAsync(
7370
metaDir: appHost.ContentRootDirectory.RealPath.CombineWith("wwwroot/meta"),

0 commit comments

Comments
 (0)