Skip to content

Commit b759dee

Browse files
committed
feature: docfx
1 parent ae3e79f commit b759dee

7 files changed

Lines changed: 106 additions & 1 deletion

File tree

.github/workflows/docfx.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
branches:
8+
- 'master'
9+
paths:
10+
- 'docs/**'
11+
- 'src/**'
12+
workflow_dispatch:
13+
inputs: {}
14+
jobs:
15+
build:
16+
name: Publish
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v5
20+
21+
- name: Setup .NET
22+
uses: actions/setup-dotnet@v5
23+
with:
24+
dotnet-version: 10.0.x
25+
26+
- name: Setup DocFX
27+
run: dotnet tool install -g docfx --version 2.78.5
28+
29+
- name: Build Gommon docs
30+
run: docfx docs/docfx.json
31+
32+
- name: Push to the gh-pages branch
33+
uses: cpina/github-action-push-to-another-repository@main
34+
env:
35+
API_TOKEN_GITHUB: ${{ secrets.DOCFX_GITHUB_TOKEN }}
36+
with:
37+
source-directory: 'docs/generated'
38+
destination-github-username: 'GreemDev'
39+
destination-repository-name: 'Gommon'
40+
user-name: "GitHub Actions on behalf of GreemDev"
41+
user-email: greemdev@ryujinx.app
42+
target-branch: gh-pages

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
.idea/
22
.vs/
3+
docs/generated
4+
docs/apimeta
5+
docs/api/*.yml
6+
docs/api/.manifest
37
src/bin/
48
src/obj/
59
src/Properties/

docs/api/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Gommon API Reference

docs/docfx.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/dotnet/docfx/main/schemas/docfx.schema.json",
3+
"metadata": [
4+
{
5+
"src": [
6+
{
7+
"src": "../src",
8+
"files": [
9+
"**/*.csproj"
10+
]
11+
}
12+
],
13+
"output": "apimeta"
14+
}
15+
],
16+
"build": {
17+
"maxParallelism": 6,
18+
"content": [
19+
{
20+
"src": "api",
21+
"files": [ "index.md", "toc.yml" ],
22+
"dest": "api"
23+
},
24+
{
25+
"src": "apimeta",
26+
"files": [ "**.yml" ],
27+
"dest": "api"
28+
},
29+
{
30+
"files": [ "toc.yml", "index.md" ]
31+
}
32+
],
33+
"resource": [],
34+
"output": "generated",
35+
"template": [
36+
"default",
37+
"modern"
38+
],
39+
"globalMetadata": {
40+
"_appName": "Gommon",
41+
"_appTitle": "Gommon",
42+
"_enableSearch": true,
43+
"pdf": false
44+
}
45+
}
46+
}

docs/index.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
_layout: landing
3+
---
4+
5+
# This is the **HOMEPAGE**.
6+
7+
Refer to [Markdown](http://daringfireball.net/projects/markdown/) for how to write markdown files.
8+
9+
## Quick Start Notes:
10+
11+
1. Add images to the *images* folder if the file is referencing an image.

docs/toc.yml

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

src/Utils/StringUtil.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ string rearrange(string s)
3333
/// </summary>
3434
/// <param name="length"></param>
3535
/// <param name="allowRepeats"></param>
36-
/// <returns></returns>
3736
public static string RandomAlphanumeric(int length, bool allowRepeats = true)
3837
{
3938
Guard.Ensure(length > 0, "length must be at least 1");

0 commit comments

Comments
 (0)