Skip to content

Commit

Permalink
ci: More work on docs build
Browse files Browse the repository at this point in the history
  • Loading branch information
bdunderscore committed Sep 10, 2023
1 parent 2f0027d commit 3a65482
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
8 changes: 8 additions & 0 deletions .github/ProjectRoot/build-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

set -euxo pipefail

apt-get -y update
apt-get -y install dotnet7
dotnet tool update -g docfx
ls -l /root/.dotnet/tools
16 changes: 10 additions & 6 deletions UnitTests~/DocsBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,21 @@ public static void BuildDocs()
ProjectGeneration projectGeneration = new ProjectGeneration();
AssetDatabase.Refresh();
projectGeneration.GenerateAndWriteSolutionAndProjects();

RunProcess("apt-get -y update");
RunProcess("apt-get -y install dotnet7");
RunProcess("dotnet tool update -g docfx");
RunProcess("ls -l /root/.dotnet/tools");

try
{
RunProcess("./build-docs.sh");
}
catch (Exception e)
{
System.Console.Error.WriteLine("Failed to build docs: " + e);
}
}

private static void RunProcess(string command)
{
System.Console.Error.WriteLine("=== Running command: " + command + " ===");
var process = Process.Start(command);
var process = Process.Start("/bin/sh", "-c command");
process.WaitForExit();

if (process.ExitCode != 0)
Expand Down

0 comments on commit 3a65482

Please sign in to comment.