diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index e34e6b7..33030ab 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -152,3 +152,31 @@ jobs: - name: Publish to NuGet run: dotnet nuget push ./nupkg/*.nupkg --source $NUGET_FEED --skip-duplicate --api-key $NUGET_KEY + documentation: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 6.0.x + + - name: Setup DocFX + uses: crazy-max/ghaction-chocolatey@v1 + with: + args: install docfx + + - name: Restore + run: dotnet restore + + - name: DocFX Build + run: docfx docfx.json + continue-on-error: false + + - name: Upload Docs + uses: actions/upload-artifact@v2 + with: + name: documentation + path: _site diff --git a/docfx.json b/docfx.json new file mode 100644 index 0000000..93426e7 --- /dev/null +++ b/docfx.json @@ -0,0 +1,38 @@ +{ + "metadata": [ + { + "src": [ + { + "files": [ "**/*.sln", "*/*.csproj" ], + "exclude": [ "**/bin/**", "**/obj/**" ] + } + ], + "dest": "obj/api" + } + ], + "build": { + "content": [ + { + "files": [ "**/*.yml" ], + "src": "obj/api", + "dest": "api" + }, + { + "files": [ "articles/**/*.md", "*.md", "toc.yml", "restapi/**" ] + } + ], + "resource": [ + { + "files": [ "articles/images/**"] + } + ], + "overwrite": "specs/*.md", + "globalMetadata": { + "_appTitle": "SemGuS Parser Documentation", + "_enableSearch": true + }, + "markdownEngineName": "markdig", + "dest": "_site", + "xrefService": [ "https://xref.docs.microsoft.com/query?uid={uid}" ] + } +}