From c067456f86b0bf1677f780069a2ff852c3f7f55f Mon Sep 17 00:00:00 2001 From: StefanGreve Date: Tue, 16 Jul 2024 22:57:45 +0200 Subject: [PATCH] Configure GitHub Pages workflow for docfx --- .github/workflows/docs.yml | 47 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..dc7cf5e --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,47 @@ +name: Docs + +on: + push: + branches: + - master + paths: + - AdvancedSystems.Core/** + - AdvancedSystems.Core.Abstractions/** + - docs/** + - .github/workflows/docs.yml + pull_request: + branches: + - master + paths: + - docs/** + - .github/workflows/docs.yml + workflow_dispatch: + +jobs: + generate-docs: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.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@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/_site + force_orphan: true