Skip to content

Commit 0918760

Browse files
authored
add API document github page (#1114)
* Doc (#66) * add doc * ln -s md * add pipeline * Update docfx.yaml * Update docfx.yaml * Update docfx.yaml * Update docfx.yaml * Update toc.yml
1 parent 5e12972 commit 0918760

File tree

5 files changed

+113
-0
lines changed

5 files changed

+113
-0
lines changed

.github/workflows/docfx.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Docfx
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
# Allows you to run this workflow manually from the Actions tab
8+
workflow_dispatch:
9+
10+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
# Allow one concurrent deployment
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: true
20+
21+
jobs:
22+
docfx:
23+
runs-on: ubuntu-latest
24+
environment:
25+
name: github-pages
26+
url: ${{ steps.deployment.outputs.page_url }}
27+
steps:
28+
- uses: actions/checkout@v3
29+
with:
30+
fetch-depth: 0
31+
32+
- name: Setup dotnet
33+
uses: actions/setup-dotnet@v3
34+
with:
35+
dotnet-version: |
36+
3.1.x
37+
5.0.x
38+
6.0.x
39+
40+
- name: Build
41+
run: dotnet build
42+
43+
- uses: nikeee/docfx-action@v1.0.0
44+
name: Build Documentation
45+
with:
46+
args: doc/docfx.json
47+
48+
- name: Setup Pages
49+
uses: actions/configure-pages@v2
50+
- name: Upload artifact
51+
uses: actions/upload-pages-artifact@v1
52+
with:
53+
# Upload entire repository
54+
path: doc/_site
55+
- name: Deploy to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v1

doc/.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
###############
2+
# folder #
3+
###############
4+
/**/DROP/
5+
/**/TEMP/
6+
/**/packages/
7+
/**/bin/
8+
/**/obj/
9+
_site
10+
11+
api

doc/docfx.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"metadata": [
3+
{
4+
"src": [
5+
{
6+
"files": [
7+
"KubernetesClient.Basic/bin/Debug/netstandard2.0/KubernetesClient.Basic.dll",
8+
"KubernetesClient.Models/bin/Debug/netstandard2.0/KubernetesClient.Models.dll",
9+
"KubernetesClient/KubernetesClient.csproj"
10+
],
11+
"src": "../src"
12+
}
13+
],
14+
"dest": "api",
15+
"disableGitFeatures": false,
16+
"disableDefaultFilter": false
17+
}
18+
],
19+
"build": {
20+
"content": [
21+
{
22+
"files": [
23+
"api/**.yml",
24+
"index.md",
25+
"toc.yml"
26+
]
27+
}
28+
],
29+
"dest": "_site",
30+
"globalMetadataFiles": [],
31+
"fileMetadataFiles": [],
32+
"template": [
33+
"default"
34+
],
35+
"postProcessors": [],
36+
"markdownEngineName": "markdig",
37+
"noLangKeyword": false,
38+
"keepFileLink": false,
39+
"cleanupCacheHistory": false,
40+
"disableGitFeatures": false
41+
}
42+
}

doc/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../README.md

doc/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/k8s.yml

0 commit comments

Comments
 (0)