From 9e52c21bcca13d817507b9213c82b1df9af6cf73 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 11 Sep 2026 11:18:29 +0000 Subject: [PATCH] ci: deploy docs and coverage via GitHub Pages pipeline The shared docs-and-coverage workflow publishes by pushing a commit to the gh-pages branch with JamesIves/github-pages-deploy-action. That commit is unsigned, so the repository ruleset requiring verified signatures on gh-pages rejects the push and the job fails. Replace the reusable workflow call with a local job that runs the same build, docs, coverage and badge steps, then publishes through the official Pages pipeline (configure-pages, upload-pages-artifact, deploy-pages). This uploads an artifact instead of pushing a branch commit, so the signature rule no longer applies. Requires the repository Pages source to be set to "GitHub Actions". Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01CVQ7VL2PnxZcxTU4AZt43h --- .github/workflows/coverage-report.yml | 73 ++++++++++++++++++++++++--- 1 file changed, 67 insertions(+), 6 deletions(-) diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 05766234..cd3f1426 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -5,11 +5,72 @@ on: branches: - main +# Allow the workflow to deploy to GitHub Pages via the official Pages pipeline. +# This publishes an artifact instead of pushing a commit to the gh-pages branch, +# so the "require signed commits" ruleset no longer blocks the deployment. +permissions: + contents: read + pages: write + id-token: write + +# Only one Pages deployment at a time; do not cancel a running one. +concurrency: + group: pages + cancel-in-progress: false + jobs: - coverage-report: + generate-docs-and-coverage: name: Coverage report - uses: fingerprintjs/dx-team-toolkit/.github/workflows/docs-and-coverage.yml@v1 - with: - prepare-gh-pages-commands: | - mv docs/* ./gh-pages - mv coverage/lcov-report ./gh-pages/coverage + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Checkout the repository + uses: actions/checkout@v7 + + - name: Install pnpm + uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 + + - name: Install latest node version + uses: actions/setup-node@v6 + with: + node-version: 'lts/*' + check-latest: true + cache: pnpm + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm build + + - name: Create the docs + run: pnpm run docs + + - name: Collect coverage report + run: pnpm test:coverage + + - name: Create Coverage Badges + uses: jaywcjlove/coverage-badges-cli@998665f7962b1a3935ba8c3e786171a99436e5d1 # v2.3.0 + with: + source: coverage/coverage-summary.json + output: coverage/lcov-report/badges.svg + + - name: Prepare folder for gh-pages + run: | + mkdir gh-pages + mv docs/* ./gh-pages + mv coverage/lcov-report ./gh-pages/coverage + + - name: Setup Pages + uses: actions/configure-pages@v6 + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v5 + with: + path: gh-pages + + - name: Deploy to GitHub Pages 🚀 + id: deployment + uses: actions/deploy-pages@v5