From 1db4d9b122e11a23db8618ddd4940ac909700c86 Mon Sep 17 00:00:00 2001 From: Adrian Clark Date: Sun, 21 Apr 2024 00:47:13 +1000 Subject: [PATCH] Resolve Issues Building Docs The documentation site requires the code build, and I pulled them apart. Reunite these two processes to hopefully resolve the site issues. --- .github/workflows/_build-docs.yml | 37 ------------------------- .github/workflows/_build.yml | 15 ++++++++++ .github/workflows/build-deploy-docs.yml | 13 --------- .github/workflows/create-release.yml | 5 ---- src/iRacing Data API.sln | 1 - 5 files changed, 15 insertions(+), 56 deletions(-) delete mode 100644 .github/workflows/_build-docs.yml delete mode 100644 .github/workflows/build-deploy-docs.yml diff --git a/.github/workflows/_build-docs.yml b/.github/workflows/_build-docs.yml deleted file mode 100644 index 7132d7b..0000000 --- a/.github/workflows/_build-docs.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Build Documentation Site - -on: - workflow_call: - -jobs: - build: - runs-on: ubuntu-latest - - env: - DOTNET_NOLOGO: true - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # Avoid pre-populating the NuGet package cache - - steps: - - - name: 'Checkout Code' - uses: actions/checkout@v4 - with: - fetch-depth: 0 # Required for MinVer to work properly - - - name: 'Setup .NET SDK' - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '8.x' - - - run: dotnet tool update -g docfx - shell: pwsh - - - run: docfx doc/docfx_project/docfx.json - shell: pwsh - - - name: 'Upload Site Artifacts' - uses: actions/upload-artifact@v4 - with: - name: 'Documentation Site' - path: 'doc/docfx_project/_site/' - if-no-files-found: error diff --git a/.github/workflows/_build.yml b/.github/workflows/_build.yml index a9267b6..86f45c1 100644 --- a/.github/workflows/_build.yml +++ b/.github/workflows/_build.yml @@ -23,6 +23,7 @@ jobs: with: dotnet-version: '8.x' + # Build Solution and Run Tests - name: 'Build Solution' id: build-solution shell: pwsh @@ -49,6 +50,20 @@ jobs: path: '**/*.trx' reporter: 'dotnet-trx' + # Build and Upload Documentation + - run: dotnet tool update -g docfx + shell: pwsh + + - run: docfx doc/docfx_project/docfx.json + shell: pwsh + + - name: 'Upload Site Artifacts' + uses: actions/upload-artifact@v4 + with: + name: 'Documentation Site' + path: 'doc/docfx_project/_site/' + if-no-files-found: error + - name: 'Copy Package to Root' shell: pwsh run: | diff --git a/.github/workflows/build-deploy-docs.yml b/.github/workflows/build-deploy-docs.yml deleted file mode 100644 index edd0f52..0000000 --- a/.github/workflows/build-deploy-docs.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Build & Publish Docs to GitHub Pages - -on: workflow_dispatch - -jobs: - build: - name: Build Documentation - uses: ./.github/workflows/_build-docs.yml - - deploy: - name: Deploy Documentation - needs: build - uses: ./.github/workflows/_deploy-docs.yml diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 313e9cb..b7f56a7 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -11,15 +11,10 @@ jobs: name: Build & Test uses: ./.github/workflows/_build.yml - build-docs: - name: Build Documentation - uses: ./.github/workflows/_build-docs.yml - deploy: name: Create Draft Release with NuGet Packages & Documentation Site needs: - build - - build-docs runs-on: ubuntu-latest env: diff --git a/src/iRacing Data API.sln b/src/iRacing Data API.sln index 05960b9..4709cfc 100644 --- a/src/iRacing Data API.sln +++ b/src/iRacing Data API.sln @@ -24,7 +24,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{ ..\.github\workflows\create-release.yml = ..\.github\workflows\create-release.yml ..\.github\workflows\pr.yml = ..\.github\workflows\pr.yml ..\.github\workflows\publish-release.yml = ..\.github\workflows\publish-release.yml - ..\.github\workflows\_build-docs.yml = ..\.github\workflows\_build-docs.yml ..\.github\workflows\_build.yml = ..\.github\workflows\_build.yml ..\.github\workflows\_deploy-docs.yml = ..\.github\workflows\_deploy-docs.yml EndProjectSection