From 946fb211641e17287ec2c55dd1e168957f6b5546 Mon Sep 17 00:00:00 2001 From: Van Nguyen Date: Sat, 17 Oct 2026 06:54:58 +0700 Subject: [PATCH] ci: skip docs-only pull requests, cancel superseded runs A pull request that only changes Markdown files at the root, docs/ or LICENSE no longer runs CI; pushes to the main branch still do. A new push to a pull request cancels its older run; branch runs always finish. --- .github/workflows/ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5636687..11f6de1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,17 @@ name: CI on: push: { branches: [main] } - pull_request: { branches: [main] } + pull_request: + branches: [main] + paths-ignore: + - '*.md' + - 'docs/**' + - LICENSE + +# A new push to the same pull request cancels the older run; runs on a branch always finish. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: test: