diff --git a/docs/Docs.csproj b/docs/Docs.csproj index ded6bac..459f8a9 100644 --- a/docs/Docs.csproj +++ b/docs/Docs.csproj @@ -39,6 +39,7 @@ + diff --git a/docs/Program.cs b/docs/Program.cs index 1e2a19b..a7f8576 100644 --- a/docs/Program.cs +++ b/docs/Program.cs @@ -34,7 +34,6 @@ namespace Docs i.AddSingleton(new TypeNameLinks()); }) .ConfigureSite("spectreconsole", "spectre.console", "main") - .ConfigureDeployment(deployBranch: "docs") .AddShortcode("Children", typeof(ChildrenShortcode)) .AddShortcode("ColorTable", typeof(ColorTableShortcode)) .AddShortcode("EmojiTable", typeof(EmojiTableShortcode)) diff --git a/docs/src/Constants.cs b/docs/src/Constants.cs index 87ae0db..42b2e48 100644 --- a/docs/src/Constants.cs +++ b/docs/src/Constants.cs @@ -42,8 +42,8 @@ namespace Docs public static class Deployment { - public const string GitHubToken = "GITHUB_TOKEN"; - public const string TargetBranch = "DEPLOYMENT_TARGET_BRANCH"; + public const string NetlifySiteId = "NETLIFY_SITE_ID"; + public const string NetlifyAccessToken = "NETLIFY_ACCESS_TOKEN"; } } } diff --git a/docs/src/Extensions/BootstrapperExtensions.cs b/docs/src/Extensions/BootstrapperExtensions.cs index c8f77a8..cea29c0 100644 --- a/docs/src/Extensions/BootstrapperExtensions.cs +++ b/docs/src/Extensions/BootstrapperExtensions.cs @@ -1,5 +1,6 @@ using Statiq.App; using Statiq.Common; +using Statiq.Web; namespace Docs.Extensions { @@ -15,11 +16,5 @@ namespace Docs.Extensions } return bootstrapper; } - - public static Bootstrapper ConfigureDeployment(this Bootstrapper bootstrapper, string deployBranch) - { - bootstrapper?.AddSetting(Constants.Deployment.TargetBranch, deployBranch); - return bootstrapper; - } } } diff --git a/docs/src/Pipelines/DeploymentPipeline.cs b/docs/src/Pipelines/DeploymentPipeline.cs index 9ebd6f3..298804a 100644 --- a/docs/src/Pipelines/DeploymentPipeline.cs +++ b/docs/src/Pipelines/DeploymentPipeline.cs @@ -1,5 +1,6 @@ using Statiq.Common; using Statiq.Web.GitHub; +using Statiq.Web.Netlify; namespace Docs.Pipelines { @@ -10,12 +11,11 @@ namespace Docs.Pipelines Deployment = true; OutputModules = new ModuleList { - new DeployGitHubPages( - Config.FromSetting(Constants.Site.Owner), - Config.FromSetting(Constants.Site.Repository), - Config.FromSetting(Constants.Deployment.GitHubToken)) - .ToBranch(Config.FromSetting(Constants.Deployment.TargetBranch)) + new DeployNetlifySite( + siteId: Config.FromSetting(Constants.Deployment.NetlifySiteId), + accessToken: Config.FromSetting(Constants.Deployment.NetlifyAccessToken) + ) }; } } -} +} \ No newline at end of file