Skip to content

Commit dcd6d4d

Browse files
authored
ci: skip docs workflows on draft PRs (#4938)
1 parent 11394d1 commit dcd6d4d

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/docs_ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
- '!docs/manifest.json'
1212
- 'lerna.json'
1313
pull_request:
14+
types: [opened, synchronize, reopened, ready_for_review]
1415
branches:
1516
- master
1617
- minor
@@ -27,6 +28,8 @@ concurrency:
2728
jobs:
2829
validate:
2930
name: Validate MDX
31+
# Skip draft PRs
32+
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
3033
permissions:
3134
contents: read
3235
runs-on: ubuntu-latest
@@ -48,8 +51,8 @@ jobs:
4851

4952
generate-manifest:
5053
name: Generate & commit manifest
51-
# Skip fork PRs can't push back to fork branches
52-
if: ${{ github.event_name == 'push' || !github.event.pull_request.head.repo.fork }}
54+
# Skip fork PRs (can't push back to fork branches) and draft PRs
55+
if: ${{ github.event_name == 'push' || (!github.event.pull_request.head.repo.fork && !github.event.pull_request.draft) }}
5356
runs-on: ubuntu-latest
5457
permissions:
5558
contents: write

.github/workflows/generate_docs.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Generate Docs
22

33
on:
44
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
56
branches:
67
- master
78
- minor
@@ -17,8 +18,8 @@ concurrency:
1718
jobs:
1819
generate:
1920
name: Generate & commit docs
20-
# Skip fork PRs can't push back to fork branches
21-
if: ${{ !github.event.pull_request.head.repo.fork }}
21+
# Skip fork PRs (can't push back to fork branches) and draft PRs
22+
if: ${{ !github.event.pull_request.head.repo.fork && !github.event.pull_request.draft }}
2223
runs-on: ubuntu-latest
2324
permissions:
2425
contents: write

0 commit comments

Comments
 (0)