Skip to content

Commit

Permalink
ci: actually build docs maybe?
Browse files Browse the repository at this point in the history
  • Loading branch information
bdunderscore committed Sep 10, 2023
1 parent 126ae74 commit 291d36b
Show file tree
Hide file tree
Showing 10 changed files with 94 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .github/ProjectRoot/build-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ apt-get -y update
apt-get -y install dotnet7
(cd /; dotnet tool update -g docfx)
ls -l /root/.dotnet/tools
ls -l .
ls -l .

docfx Packages/nadena.dev.ndmf/docfx~/docfx.json
tar -C Packages/nadena.dev.ndmf/docfx~/_site -czf build/StandaloneWindows/docs.tgz .
6 changes: 3 additions & 3 deletions UnitTests~/DocsBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ public static class DocsBuilder
public static void BuildDocs()
{
// Make sure the build directory exists (this keeps GameCI happy)
System.IO.Directory.CreateDirectory("build");
System.IO.Directory.CreateDirectory("build/StandaloneWindows");
// Create a dummy file as well
System.IO.File.WriteAllText("build/dummy.txt", "");
System.IO.File.WriteAllText("build/StandaloneWindows/dummy.txt", "");

ProjectGeneration projectGeneration = new ProjectGeneration();
AssetDatabase.Refresh();
projectGeneration.GenerateAndWriteSolutionAndProjects();

try
{
RunProcess("./build-docs.sh");
Expand Down
9 changes: 9 additions & 0 deletions docfx~/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
###############
# folder #
###############
/**/DROP/
/**/TEMP/
/**/packages/
/**/bin/
/**/obj/
_site/
5 changes: 5 additions & 0 deletions docfx~/api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
###############
# temp file #
###############
*.yml
.manifest
2 changes: 2 additions & 0 deletions docfx~/api/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# PLACEHOLDER
TODO: Add .NET projects to the *src* folder and run `docfx` to generate **REAL** *API Documentation*!
1 change: 1 addition & 0 deletions docfx~/articles/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Add your introductions here!
2 changes: 2 additions & 0 deletions docfx~/articles/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- name: Introduction
href: intro.md
59 changes: 59 additions & 0 deletions docfx~/docfx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"metadata": [
{
"src": [
{
"cwd": "../../..",
"files": [
"nadena.dev.ndmf.csproj",
"nadena.dev.ndmf.runtime.csproj"
]
}
],
"dest": "api",
"includePrivateMembers": false,
"disableGitFeatures": false,
"disableDefaultFilter": false,
"noRestore": false,
"namespaceLayout": "flattened",
"memberLayout": "samePage",
"EnumSortOrder": "alphabetic",
"allowCompilationErrors": false
}
],
"build": {
"content": [
{
"files": [
"api/**.yml",
"api/index.md"
]
},
{
"files": [
"articles/**.md",
"articles/**/toc.yml",
"toc.yml",
"*.md"
]
}
],
"resource": [
{
"files": [
"images/**"
]
}
],
"output": "_site",
"globalMetadataFiles": [],
"fileMetadataFiles": [],
"template": [
"default",
"modern"
],
"postProcessors": [],
"keepFileLink": false,
"disableGitFeatures": false
}
}
4 changes: 4 additions & 0 deletions docfx~/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This is the **HOMEPAGE**.
Refer to [Markdown](http://daringfireball.net/projects/markdown/) for how to write markdown files.
## Quick Start Notes:
1. Add images to the *images* folder if the file is referencing an image.
5 changes: 5 additions & 0 deletions docfx~/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- name: Articles
href: articles/
- name: Api Documentation
href: api/
homepage: api/index.md

0 comments on commit 291d36b

Please sign in to comment.