diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index 3e3b3945da..9d09e6334e 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -163,12 +163,17 @@ jobs: fi exit $retval - dox-build: - name: Build Doxygen Site + pages-build: + name: Build gh-pages runs-on: ubuntu-latest needs: start-ci-run-gate if: "!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success'" steps: + - name: Setup dotnet + uses: actions/setup-dotnet@v2 + with: + dotnet-version: ${{ env.TGS_DOTNET_VERSION }} + - name: Checkout (Branch) uses: actions/checkout@v3 if: github.event_name == 'push' || github.event_name == 'schedule' @@ -179,6 +184,20 @@ jobs: with: ref: "refs/pull/${{ github.event.number }}/merge" + - name: gh-pages Clone + run: git clone -b gh-pages --single-branch "https://git@github.com/tgstation/tgstation-server" $HOME/tgsdox + + - name: Restore + run: dotnet restore + + - name: Build ReleaseNotes + run: dotnet build -c Release tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj + + - name: Build Changelog (Incremental) + run: | + cp $HOME/tgsdox/changelog.yml ./ 2>/dev/null + dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes --generate-full-notes + - name: Patch Doxyfile run: | VERSION=$(cat "build/Version.props" | grep -oPm1 "(?<=)[^<]+") @@ -189,13 +208,13 @@ jobs: with: doxyfile-path: 'docs/Doxyfile' - - name: gh-pages push + - name: gh-pages Push if: github.event_name == 'push' && github.event.ref == 'refs/heads/dev' && env.TGS_RELEASE_NOTES_TOKEN != '' run: | - git clone -b gh-pages --single-branch "https://git@github.com/tgstation/tgstation-server" $HOME/tgsdox pushd $HOME/tgsdox rm -r * popd + sudo mv changlog.yml $HOME/tgsdox/ echo ./doxout/* | xargs -n 10 sudo mv -t $HOME/tgsdox cd $HOME/tgsdox git config --global push.default simple @@ -1211,9 +1230,9 @@ jobs: ci-completion-gate: # This job exists so there isn't a moving target for branch protections name: CI Completion Gate - needs: [ dox-build, docker-build, build-deb, build-msi, validate-openapi-spec, upload-code-coverage, check-winget-pr-template ] + needs: [ pages-build, docker-build, build-deb, build-msi, validate-openapi-spec, upload-code-coverage, check-winget-pr-template ] runs-on: ubuntu-latest - if: "!(cancelled() || failure()) && needs.dox-build.result == 'success' && needs.docker-build.result == 'success' && needs.build-deb.result == 'success' && needs.build-msi.result == 'success' && needs.validate-openapi-spec.result == 'success' && needs.upload-code-coverage.result == 'success' && needs.check-winget-pr-template.result == 'success'" + if: "!(cancelled() || failure()) && needs.pages-build.result == 'success' && needs.docker-build.result == 'success' && needs.build-deb.result == 'success' && needs.build-msi.result == 'success' && needs.validate-openapi-spec.result == 'success' && needs.upload-code-coverage.result == 'success' && needs.check-winget-pr-template.result == 'success'" steps: - name: GitHub Requires at Least One Step for a Job run: exit 0