diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml new file mode 100644 index 0000000000..a35cd04314 --- /dev/null +++ b/.github/workflows/doc.yml @@ -0,0 +1,30 @@ +name: Generate Documentation +on: + push: + branches: + - master +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1' # Or your required .NET version + + - name: Install DocFx + run: dotnet tool install --global docfx + + - name: Generate Documentation + run: | + export PATH="$PATH:/home/runner/.dotnet/tools" + docfx docfx.json + + - name: Publish Documentation to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./_site # or your DocFx output directory