diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae1d2a5..864f9f7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,3 +18,13 @@ jobs: run: dotnet build src/VSPoll.API.sln - name: Test run: dotnet test /p:CollectCoverage=true /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:CoverletOutput=BuildReports/Coverage/ /p:CoverletOutputFormat=cobertura --collect:"XPlat Code Coverage" src/VSPoll.API.UnitTest/VSPoll.API.UnitTest.csproj + - name: Install DocFX + run: dotnet tool update -g docfx + - name: Run DocFX + run: docfx docfx/docfx.json + - name: Deploy DocFX + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.ref == 'refs/heads/master' }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docfx/_site diff --git a/docfx/.gitignore b/docfx/.gitignore new file mode 100644 index 0000000..4378419 --- /dev/null +++ b/docfx/.gitignore @@ -0,0 +1,9 @@ +############### +# folder # +############### +/**/DROP/ +/**/TEMP/ +/**/packages/ +/**/bin/ +/**/obj/ +_site diff --git a/docfx/api/.gitignore b/docfx/api/.gitignore new file mode 100644 index 0000000..e8079a3 --- /dev/null +++ b/docfx/api/.gitignore @@ -0,0 +1,5 @@ +############### +# temp file # +############### +*.yml +.manifest diff --git a/docfx/articles/intro.md b/docfx/articles/intro.md new file mode 100644 index 0000000..c0478ce --- /dev/null +++ b/docfx/articles/intro.md @@ -0,0 +1 @@ +# Add your introductions here! diff --git a/docfx/articles/toc.yml b/docfx/articles/toc.yml new file mode 100644 index 0000000..ff89ef1 --- /dev/null +++ b/docfx/articles/toc.yml @@ -0,0 +1,2 @@ +- name: Introduction + href: intro.md diff --git a/docfx/docfx.json b/docfx/docfx.json new file mode 100644 index 0000000..5945984 --- /dev/null +++ b/docfx/docfx.json @@ -0,0 +1,69 @@ +{ + "$schema": "https://json.schemastore.org/docfx.json", + "metadata": [ + { + "src": [ + { + "files": [ + "src/**.csproj" + ], + "exclude": [ + "**/*Test.csproj" + ], + "src": ".." + } + ], + "dest": "api", + "disableGitFeatures": false, + "disableDefaultFilter": false + } + ], + "build": { + "content": [ + { + "files": [ + "api/**.yml", + "api/index.md" + ] + }, + { + "files": [ + "articles/**.md", + "articles/**/toc.yml", + "toc.yml", + "*.md" + ] + } + ], + "resource": [ + { + "files": [ + "images/**" + ] + } + ], + "overwrite": [ + { + "files": [ + "apidoc/**.md" + ], + "exclude": [ + "obj/**", + "_site/**" + ] + } + ], + "dest": "_site", + "globalMetadataFiles": [], + "fileMetadataFiles": [], + "template": [ + "default" + ], + "postProcessors": [], + "markdownEngineName": "markdig", + "noLangKeyword": false, + "keepFileLink": false, + "cleanupCacheHistory": false, + "disableGitFeatures": false + } +} diff --git a/docfx/index.md b/docfx/index.md new file mode 100644 index 0000000..3ae2506 --- /dev/null +++ b/docfx/index.md @@ -0,0 +1,4 @@ +# This is the **HOMEPAGE**. +Refer to [Markdown](http://daringfireball.net/projects/markdown/) for how to write markdown files. +## Quick Start Notes: +1. Add images to the *images* folder if the file is referencing an image. diff --git a/docfx/toc.yml b/docfx/toc.yml new file mode 100644 index 0000000..59f8010 --- /dev/null +++ b/docfx/toc.yml @@ -0,0 +1,5 @@ +- name: Articles + href: articles/ +- name: Api Documentation + href: api/ + homepage: api/index.md