From 7f2807b4f6b01c576dc28cc7980d07cfac4dd9da Mon Sep 17 00:00:00 2001 From: Piras314 Date: Thu, 16 Jan 2025 11:03:59 -0500 Subject: [PATCH] Create build-docfx.yml --- .github/workflows/build-docfx.yml | 56 +++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/build-docfx.yml diff --git a/.github/workflows/build-docfx.yml b/.github/workflows/build-docfx.yml new file mode 100644 index 0000000000..f0f04db082 --- /dev/null +++ b/.github/workflows/build-docfx.yml @@ -0,0 +1,56 @@ +name: Build & Publish Docfx + +on: + push: + branches: + - main + +permissions: + actions: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + docfx: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3.6.0 + - name: Setup submodule + run: | + git submodule update --init --recursive + - name: Pull engine updates + uses: space-wizards/submodule-dependency@v0.1.5 + - name: Update Engine Submodules + run: | + cd RobustToolbox/ + git submodule update --init --recursive + - name: Setup .NET Core + uses: actions/setup-dotnet@v3.2.0 + with: + dotnet-version: 8.0.x + + - name: Install dependencies + run: dotnet restore + + - name: Build Project + run: dotnet build --no-restore /p:WarningsAsErrors=nullable + + - run: dotnet tool update -g docfx + - run: docfx Content.Docfx/docfx.json + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: 'Content.Docfx/_site' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4