From b156766b04979ca5409248454706d4e00b04f7aa Mon Sep 17 00:00:00 2001 From: Benson Date: Mon, 16 Mar 2026 15:59:52 +0700 Subject: [PATCH 1/2] fix(ci): guard docs deploy job against PR environment protection rejection GitHub evaluates environment protection rules before job `if` conditions, causing the github-pages deployment to be rejected on PR branches even with `github.ref == 'refs/heads/main'`. Adding `github.event_name == 'push'` ensures the deploy job is never queued for pull_request events. Also add ?style=flat-square to CI badge URL for visual consistency. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/docs.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e7ca1a6f..7aaee81c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -73,7 +73,7 @@ jobs: # Deploy to production on main branch deploy: - if: github.ref == 'refs/heads/main' + if: github.event_name == 'push' && github.ref == 'refs/heads/main' environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} diff --git a/README.md b/README.md index a0a672fa..624ac09b 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Show proof for every AI citation.
-[![CI](https://github.com/DeepCitation/deepcitation/actions/workflows/ci.yml/badge.svg)](https://github.com/DeepCitation/deepcitation/actions/workflows/ci.yml) +[![CI](https://github.com/DeepCitation/deepcitation/actions/workflows/ci.yml/badge.svg)](https://github.com/DeepCitation/deepcitation/actions/workflows/ci.yml?style=flat-square) [![License: MIT](https://img.shields.io/badge/License-MIT-005595?style=flat-square)](https://opensource.org/licenses/MIT) [![Zero Dependencies](https://img.shields.io/badge/Zero%20Dependencies-trusted-10b981?style=flat-square)](https://www.npmjs.com/package/deepcitation) [![~17KB](https://img.shields.io/badge/gzip-~17KB-10b981?style=flat-square)](https://bundlephobia.com/package/deepcitation) From e9f96f3af7c58b4a5168027a7b2a53d1c9df2193 Mon Sep 17 00:00:00 2001 From: Benson Date: Mon, 16 Mar 2026 16:05:50 +0700 Subject: [PATCH 2/2] fix(docs): switch CI badge to shields.io for flat-square style support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The native GitHub Actions badge SVG does not support the `style` query parameter — that is a shields.io-only feature. The previous change added `?style=flat-square` to the link URL (the click-through destination) which has no visual effect. Switch to shields.io equivalent so the CI badge matches the visual style of the License, Zero Dependencies, and ~17KB badges. Co-Authored-By: Claude Sonnet 4.6 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 624ac09b..056752ff 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Show proof for every AI citation.
-[![CI](https://github.com/DeepCitation/deepcitation/actions/workflows/ci.yml/badge.svg)](https://github.com/DeepCitation/deepcitation/actions/workflows/ci.yml?style=flat-square) +[![CI](https://img.shields.io/github/actions/workflow/status/DeepCitation/deepcitation/ci.yml?style=flat-square&label=CI)](https://github.com/DeepCitation/deepcitation/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-005595?style=flat-square)](https://opensource.org/licenses/MIT) [![Zero Dependencies](https://img.shields.io/badge/Zero%20Dependencies-trusted-10b981?style=flat-square)](https://www.npmjs.com/package/deepcitation) [![~17KB](https://img.shields.io/badge/gzip-~17KB-10b981?style=flat-square)](https://bundlephobia.com/package/deepcitation)