diff --git a/.github/workflows/docfx.yaml b/.github/workflows/docfx.yaml new file mode 100644 index 000000000..fcfaa80a3 --- /dev/null +++ b/.github/workflows/docfx.yaml @@ -0,0 +1,57 @@ +name: Docfx + +on: + push: + branches: [ master ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + docfx: + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup dotnet + uses: actions/setup-dotnet@v3 + with: + dotnet-version: | + 3.1.x + 5.0.x + 6.0.x + + - name: Build + run: dotnet build + + - uses: nikeee/docfx-action@v1.0.0 + name: Build Documentation + with: + args: doc/docfx.json + + - name: Setup Pages + uses: actions/configure-pages@v2 + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + # Upload entire repository + path: doc/_site + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 diff --git a/doc/.gitignore b/doc/.gitignore new file mode 100644 index 000000000..2f16432e9 --- /dev/null +++ b/doc/.gitignore @@ -0,0 +1,11 @@ +############### +# folder # +############### +/**/DROP/ +/**/TEMP/ +/**/packages/ +/**/bin/ +/**/obj/ +_site + +api \ No newline at end of file diff --git a/doc/docfx.json b/doc/docfx.json new file mode 100644 index 000000000..44b7e7785 --- /dev/null +++ b/doc/docfx.json @@ -0,0 +1,42 @@ +{ + "metadata": [ + { + "src": [ + { + "files": [ + "KubernetesClient.Basic/bin/Debug/netstandard2.0/KubernetesClient.Basic.dll", + "KubernetesClient.Models/bin/Debug/netstandard2.0/KubernetesClient.Models.dll", + "KubernetesClient/KubernetesClient.csproj" + ], + "src": "../src" + } + ], + "dest": "api", + "disableGitFeatures": false, + "disableDefaultFilter": false + } + ], + "build": { + "content": [ + { + "files": [ + "api/**.yml", + "index.md", + "toc.yml" + ] + } + ], + "dest": "_site", + "globalMetadataFiles": [], + "fileMetadataFiles": [], + "template": [ + "default" + ], + "postProcessors": [], + "markdownEngineName": "markdig", + "noLangKeyword": false, + "keepFileLink": false, + "cleanupCacheHistory": false, + "disableGitFeatures": false + } +} \ No newline at end of file diff --git a/doc/index.md b/doc/index.md new file mode 120000 index 000000000..32d46ee88 --- /dev/null +++ b/doc/index.md @@ -0,0 +1 @@ +../README.md \ No newline at end of file diff --git a/doc/toc.yml b/doc/toc.yml new file mode 100644 index 000000000..8bf2c8ed1 --- /dev/null +++ b/doc/toc.yml @@ -0,0 +1,2 @@ +- name: API Documentation + href: api/k8s.yml