diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 399abb5..f5bd43c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,11 @@ on: pull_request: workflow_dispatch: +permissions: + contents: read + pages: write + id-token: write + jobs: test: runs-on: ubuntu-latest @@ -89,3 +94,30 @@ jobs: path: | build/reports/tests/test build/test-results/test + + deploy-coverage: + needs: test + if: github.ref == 'refs/heads/main' && github.event_name == 'push' + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Download coverage report + uses: actions/download-artifact@v4 + with: + name: jacoco-html-report + path: coverage + + - name: Setup Pages + uses: actions/configure-pages@v5 + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: coverage + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4