From 41516b54429aae52b8f8eb3f776910758a3d5bc0 Mon Sep 17 00:00:00 2001 From: glopesdev Date: Fri, 24 May 2024 07:02:20 +0100 Subject: [PATCH] Add github pages deployment workflow --- .github/workflows/build.yml | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..845758c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,41 @@ +# Builds and publishes the documentation website to gh-pages branch +name: Build docs + +on: + workflow_dispatch: + +jobs: + build: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v4.1.1 + with: + submodules: true + + - name: Setup .NET Core SDK + uses: actions/setup-dotnet@v4.0.0 + with: + dotnet-version: 8.x + + - name: Setup DocFX + run: dotnet tool restore + + - name: Setup Bonsai + working-directory: .bonsai + run: .\Setup.ps1 + + - name: Build Documentation + run: .\build.ps1 + + - name: Checkout gh-pages + uses: actions/checkout@v4.1.1 + with: + ref: gh-pages + path: gh-pages + - name: Publish to github pages + uses: peaceiris/actions-gh-pages@v3.9.3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: _site + force_orphan: true \ No newline at end of file