Skip to content

Commit 4af15fd

Browse files
authored
Publish API docs to GH pages (#7)
1 parent 33fb146 commit 4af15fd

File tree

9 files changed

+123
-3
lines changed

9 files changed

+123
-3
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @nexus-rpc/nexus-contributors

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ jobs:
1919
steps:
2020
- name: Checkout repository
2121
uses: actions/checkout@v4
22-
with:
23-
submodules: recursive
2422

2523
- name: Setup .NET
2624
uses: actions/setup-dotnet@v4
@@ -32,5 +30,10 @@ jobs:
3230
- name: Build
3331
run: dotnet build
3432

33+
- name: Build docs
34+
run: |
35+
dotnet tool update -g docfx
36+
docfx src/NexusRpc/docs/docfx.json --warningsAsErrors
37+
3538
- name: Test
3639
run: dotnet test --logger "console;verbosity=detailed"

.github/workflows/deploy-docs.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Deploy Docs
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
deploy-docs:
9+
runs-on: ubuntu-latest
10+
needs: build-lint-test
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Setup .NET
21+
uses: actions/setup-dotnet@v4
22+
23+
- name: Build docs
24+
run: |
25+
dotnet tool update -g docfx
26+
docfx src/NexusRpc/docs/docfx.json --warningsAsErrors
27+
28+
- name: Upload docs to GitHub Pages
29+
uses: actions/upload-pages-artifact@v3
30+
with:
31+
path: src/NexusRpc/docs/_site
32+
33+
- name: Deploy to GitHub Pages
34+
uses: actions/deploy-pages@v4

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
**⚠️ This SDK is currently at an experimental release stage. Backwards-incompatible changes are anticipated until a
44
stable release is announced. ⚠️**
55

6-
.NET SDK for working with [Nexus RPC](https://github.com/nexus-rpc/api).
6+
.NET SDK for working with [Nexus RPC](https://github.com/nexus-rpc/api). See
7+
[API documentation](https://nexus-rpc.github.io/sdk-dotnet/)
78

89
## What is Nexus?
910

src/NexusRpc/docs/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/_site
2+
/api/*.yml
3+
/api/.manifest

src/NexusRpc/docs/api/index.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta http-equiv="refresh" content="0; url=NexusRpc.html">
5+
</head>
6+
<body>
7+
If you are not redirected automatically, <a href="NexusRpc.html">click here</a>.
8+
</body>
9+
</html>

src/NexusRpc/docs/docfx.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"metadata": [
3+
{
4+
"src": [
5+
{
6+
"files": [
7+
"*.csproj"
8+
],
9+
"exclude": [
10+
"**/bin/**",
11+
"**/obj/**"
12+
],
13+
"src": ".."
14+
}
15+
],
16+
"dest": "api",
17+
"includePrivateMembers": false,
18+
"disableGitFeatures": false,
19+
"disableDefaultFilter": false,
20+
"noRestore": false,
21+
"namespaceLayout": "nested",
22+
"memberLayout": "samePage",
23+
"allowCompilationErrors": false
24+
}
25+
],
26+
"build": {
27+
"content": [
28+
{
29+
"files": [
30+
"api/**.yml"
31+
]
32+
}
33+
],
34+
"resource": [
35+
{ "files": ["logo.svg", "index.html", "api/index.html"] }
36+
],
37+
"globalMetadata": {
38+
"_appFooter": "<span></span>",
39+
"_appName": "Nexus .NET SDK",
40+
"_appTitle": "Nexus .NET SDK",
41+
"_appLogoPath": "logo.svg",
42+
"_enableSearch": false,
43+
"_disableContribution": true
44+
},
45+
"output": "_site",
46+
"globalMetadataFiles": [],
47+
"fileMetadataFiles": [],
48+
"template": [
49+
"default",
50+
"modern"
51+
],
52+
"postProcessors": [],
53+
"keepFileLink": false,
54+
"disableGitFeatures": false
55+
}
56+
}

src/NexusRpc/docs/index.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta http-equiv="refresh" content="0; url=api/NexusRpc.html">
5+
</head>
6+
<body>
7+
If you are not redirected automatically, <a href="api/NexusRpc.html">click here</a>.
8+
</body>
9+
</html>

src/NexusRpc/docs/logo.svg

Lines changed: 4 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)