diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..32baada3 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,44 @@ +name: Docs + +on: + push: + branches: + - main + paths: + - docs/** + pull_request: + branches: + - main + paths: + - docs/** + +jobs: + generate-docs: + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.x + + - name: Setup DocFX + uses: crazy-max/ghaction-chocolatey@v1 + with: + args: install docfx + + - name: DocFX Build + working-directory: docs + run: docfx .\docfx.json + continue-on-error: false + + - name: Publish + if: github.event_name == 'push' + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/_site + force_orphan: true