Skip to content

Commit f0f1a2b

Browse files
Skip Python CI on docs-only changes
Add paths-ignore (**.md, docs/**, mkdocs.yml) to ci.yml so lint/test/ build don't run when a change touches only prose (incl. a future mkdocs site). Move the typos job to its own typos.yml with no path filter, so spell-checking still runs on Markdown/docs changes.
1 parent 838e633 commit f0f1a2b

2 files changed

Lines changed: 28 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
name: CI
22

3+
# Python jobs (lint/test/build) skip when a change touches only prose --
4+
# Markdown or docs (incl. a future mkdocs site). Spell-checking lives in the
5+
# separate typos.yml, which has no such filter so docs are always checked.
36
on:
47
push:
58
branches: [main]
9+
paths-ignore:
10+
- "**.md"
11+
- "docs/**"
12+
- "mkdocs.yml"
613
pull_request:
14+
paths-ignore:
15+
- "**.md"
16+
- "docs/**"
17+
- "mkdocs.yml"
718

819
concurrency:
920
group: ci-${{ github.workflow }}-${{ github.ref }}
@@ -25,13 +36,6 @@ jobs:
2536
- name: ruff format --check
2637
run: uv run ruff format --check .
2738

28-
typos:
29-
name: Typos
30-
runs-on: ubuntu-latest
31-
steps:
32-
- uses: actions/checkout@v4
33-
- uses: crate-ci/typos@v1
34-
3539
test:
3640
name: Test (Python 3.12)
3741
needs: lint

.github/workflows/typos.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Typos
2+
3+
# Spell-check runs on every change (including Markdown/docs), so it is a
4+
# separate workflow from ci.yml, whose Python jobs skip prose-only changes.
5+
on: [push, pull_request]
6+
7+
concurrency:
8+
group: typos-${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
typos:
13+
name: Typos
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: crate-ci/typos@v1

0 commit comments

Comments
 (0)