Skip to content

Commit d867bb2

Browse files
committed
docs: run typecheck, but skip if changes only in landing page
1 parent d5cdbed commit d867bb2

1 file changed

Lines changed: 21 additions & 10 deletions

File tree

.github/workflows/typecheck.yml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,31 @@ on:
88
- release-*
99
tags-ignore:
1010
- v*
11-
paths-ignore:
12-
- "docs/**"
13-
- "docs.root.tsx"
14-
- "components/**"
15-
- "**/README.md"
16-
pull_request:
17-
paths-ignore:
18-
- "docs/**"
19-
- "**/*.md"
2011

2112
jobs:
13+
filter-changes:
14+
runs-on: ubuntu-latest
15+
outputs:
16+
should_skip: ${{ steps.changes.outputs.landing_page }}
17+
steps:
18+
- uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Get changed files
23+
id: changes
24+
uses: dorny/paths-filter@v2
25+
with:
26+
filters: |
27+
landing_page:
28+
- 'docs/**'
29+
- "docs.root.tsx"
30+
- "components/**"
31+
- "**/README.md"
2232
typecheck:
2333
name: "👀 Typecheck"
24-
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.changed_files != 0)
34+
needs: filter-changes
35+
if: needs.filter-changes.outputs.should_skip != 'true'
2536

2637
runs-on: ubuntu-latest
2738

0 commit comments

Comments
 (0)