-
-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (30 loc) · 1.01 KB
/
docs-ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Validate docs
on:
workflow_call:
pull_request:
# If not specified, types includes by default [opened, reopened, synchronize]
# This next line should be used in conjunction with the if statement that prevents CI jobs to run on draft PRs.
# ready_for_review is then added to make sure that a PR with no code change triggers CI if it's no longer a draft PR.
types: [ opened, reopened, synchronize, ready_for_review ]
permissions:
contents: read
jobs:
validate:
name: Validate docs
# Preventing a job from running on draft PRs.
if: '! github.event.pull_request.draft'
runs-on: "ubuntu-latest"
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Detect changes
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
docs:
- 'docs/**'
- 'README.md'
- name: Docs CI actions
if: steps.filter.outputs.docs == 'true'
uses: ./.github/actions/docs-ci