name: Publish Reports to GitHub Pages on: push: branches: - main workflow_dispatch: permissions: contents: write concurrency: group: pages-${{ github.ref }} cancel-in-progress: true jobs: publish-pages: name: Publish static reports runs-on: ubuntu-latest steps: - name: Check out source repository uses: actions/checkout@v4 with: fetch-depth: 0 - name: Validate Gradle wrapper uses: gradle/actions/wrapper-validation@v4 - name: Set up Temurin JDK 21 uses: actions/setup-java@v4 with: distribution: temurin java-version: '21' - name: Set up Gradle caching and instrumentation uses: gradle/actions/setup-gradle@v4 - name: Build reports for publication run: ./gradlew --no-daemon clean build pmdMain javadoc jacocoTestReport pitest - name: Prepare gh-pages worktree shell: bash run: | set -euo pipefail if git ls-remote --exit-code --heads origin gh-pages > /dev/null 2>&1; then git fetch origin gh-pages:gh-pages git worktree add .gh-pages gh-pages else git worktree add --detach .gh-pages cd .gh-pages git checkout --orphan gh-pages git rm -rf . > /dev/null 2>&1 || true cd .. fi - name: Stage published reports shell: bash run: | set -euo pipefail SITE_DIR=".gh-pages" RUN_DIR="${SITE_DIR}/builds/${GITHUB_RUN_NUMBER}" LATEST_DIR="${SITE_DIR}/builds/latest" mkdir -p "${RUN_DIR}" rm -rf "${LATEST_DIR}" mkdir -p "${LATEST_DIR}" cp -R build/docs/javadoc "${RUN_DIR}/javadoc" cp -R build/docs/javadoc "${LATEST_DIR}/javadoc" cp -R build/reports/tests/test "${RUN_DIR}/test" cp -R build/reports/tests/test "${LATEST_DIR}/test" cp -R build/reports/pmd "${RUN_DIR}/pmd" cp -R build/reports/pmd "${LATEST_DIR}/pmd" cp -R build/reports/jacoco/test/html "${RUN_DIR}/coverage" cp -R build/reports/jacoco/test/html "${LATEST_DIR}/coverage" cp -R build/reports/pitest "${RUN_DIR}/pitest" cp -R build/reports/pitest "${LATEST_DIR}/pitest" if [ -d "build/reports/jmh" ]; then cp -R build/reports/jmh "${RUN_DIR}/jmh" cp -R build/reports/jmh "${LATEST_DIR}/jmh" HAS_JMH="true" else HAS_JMH="false" fi cat > "${RUN_DIR}/index.html" < Radixor Reports - Build ${GITHUB_RUN_NUMBER}

Radixor Reports

Build ${GITHUB_RUN_NUMBER} from commit ${GITHUB_SHA}

Open latest report set

Back to report home

EOF cp "${RUN_DIR}/index.html" "${LATEST_DIR}/index.html" cat > "${SITE_DIR}/.nojekyll" < Radixor Reports

Radixor Published Reports

Durable CI reports published from GitHub Actions to the gh-pages branch.

Latest