diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index ce6ca28..ed393be 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -96,7 +96,7 @@ jobs: coverage: name: Coverage badge runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' && github.event_name == 'push' + if: github.ref == 'refs/heads/main' && github.event_name == 'push' || github.event_name == 'workflow_dispatch' permissions: contents: write steps: @@ -119,10 +119,15 @@ jobs: badges-directory: badges generate-coverage-badge: true + - name: Stage files for GitHub Pages + run: | + mkdir -p gh-pages/badges + mkdir -p gh-pages/coverage + cp badges/jacoco.svg gh-pages/badges/jacoco.svg + cp -r target/site/jacoco/. gh-pages/coverage/ + - name: Publish to GitHub Pages uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: . - include_only: badges/jacoco.svg,target/site/jacoco - destination_dir: . + publish_dir: gh-pages diff --git a/README.md b/README.md index 016fcee..421b9f1 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ This library provides a set of highly expressive, composable factory methods tha To be clear: this is a convenience library, not a framework. The patterns it encodes are not new or revolutionary, but having them pre-built, tested, and composable keeps application code focused on business logic rather than Criteria API mechanics. The resulting code reads like *intent* rather than plumbing. [![Build](https://github.com/erizzo/spring-data-expresspecs/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/erizzo/spring-data-expresspecs/actions/workflows/build-and-test.yml) -[![Coverage](https://erizzo.github.io/spring-data-expresspecs/badges/jacoco.svg)](https://erizzo.github.io/spring-data-expresspecs/target/site/jacoco/) +[![Coverage](https://erizzo.github.io/spring-data-expresspecs/badges/jacoco.svg)](https://erizzo.github.io/spring-data-expresspecs/coverage/) ## The Status Quo