Skip to content

Commit d473274

Browse files
committed
Added doc generation.
1 parent 5304e4c commit d473274

File tree

4 files changed

+67
-1
lines changed

4 files changed

+67
-1
lines changed

.github/workflows/generate-docs.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Generate Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- master # Run on every push to master, adjust as needed
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Check out code
14+
uses: actions/checkout@v2
15+
16+
- name: Set up .NET SDK
17+
uses: actions/setup-dotnet@v2
18+
with:
19+
dotnet-version: '6.x' # Ensure compatibility with DocFX
20+
21+
- name: Install DocFX
22+
run: |
23+
wget https://github.com/dotnet/docfx/releases/download/v2.58/docfx.zip
24+
unzip docfx.zip -d docfx
25+
26+
- name: Generate Documentation
27+
run: |
28+
docfx/docfx/docfx docfx_project/docfx.json
29+
30+
- name: Publish to GitHub Wiki
31+
uses: peaceiris/actions-gh-pages@v3
32+
with:
33+
github_token: ${{ secrets.DOCS_TOKEN }}
34+
publish_dir: docfx_project/site
35+
publish_branch: 'wiki' # Pushes directly to the wiki branch

docfx_project/docfx.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"metadata": [
3+
{
4+
"src": [
5+
{
6+
"files": [
7+
"../src/**/*.cs"
8+
]
9+
}
10+
],
11+
"dest": "api"
12+
}
13+
],
14+
"build": {
15+
"content": [
16+
{
17+
"files": [
18+
"api/**.yml",
19+
"toc.yml"
20+
]
21+
}
22+
],
23+
"dest": "site",
24+
"template": [
25+
"default"
26+
]
27+
}
28+
}
29+

docfx_project/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- name: API Documentation
2+
href: api/index.md

examples/BasicExample/ProjectSettings/ProjectSettings.asset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ PlayerSettings:
7777
androidFullscreenMode: 1
7878
defaultIsNativeResolution: 1
7979
macRetinaSupport: 1
80-
runInBackground: 0
80+
runInBackground: 1
8181
captureSingleScreen: 0
8282
muteOtherAudioSources: 0
8383
Prepare IOS For Recording: 0

0 commit comments

Comments
 (0)