Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Elastic.Markdown/DocumentationGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ public async Task GenerateAll(Cancel ctx)
var generationState = GetPreviousGenerationState();
if (!Context.SkipMetadata && (Context.Force || generationState == null))
DocumentationSet.ClearOutputDirectory();
// always delete output folder on CI
else if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("GITHUB_ACTIONS")))
DocumentationSet.ClearOutputDirectory();

if (CompilationNotNeeded(generationState, out var offendingFiles, out var outputSeenChanges))
return;
Expand Down
5 changes: 4 additions & 1 deletion src/docs-builder/Cli/Commands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ public async Task<int> Generate(
Uri? canonicalBaseUri;

if (runningOnCi)
force ??= true;
{
ConsoleApp.Log($"Build running on CI, forcing a full rebuild of the destination folder");
force = true;
}

if (canonicalBaseUrl is null)
canonicalBaseUri = new Uri("https://docs-v3-preview.elastic.dev");
Expand Down
Loading