Skip to content

Commit 3950a97

Browse files
committed
Add 'DeployTargets' setting.
1 parent 4d431a2 commit 3950a97

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Markocoa/Commands/DeployCommand.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ static void DeployToGitHub(string projectPath)
8080
// Copy build files back from temp
8181
CopyDirectory(tempBuildFolder, projectPath);
8282

83+
// Deploy to domains
84+
File.WriteAllText(System.IO.Path.Combine(projectPath, "CNAME"), string.Join("\n", settings.DeployTargets ?? Enumerable.Empty<string>()));
85+
8386
// Stage all changes
8487
LibGit2Sharp.Commands.Stage(repo, "*");
8588

Markocoa/ProjectSettings.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ internal class ProjectSettings
2727
/// </summary>
2828
public string? DefaultPage { get; set; }
2929

30+
/// <summary>
31+
/// List of domains to try and automatically deploy to.
32+
/// </summary>
33+
/// <remarks>This is used in different ways by different deploy targets.</remarks>
34+
public List<string>? DeployTargets { get; set; }
35+
3036
/// <summary>
3137
/// List of categories containing files.
3238
/// </summary>

0 commit comments

Comments
 (0)