Skip to content

Commit c3d9a70

Browse files
lunnywolfogre
andauthored
only trigger docs build and publish when docs changed (#22968)
Since drone plugin https://github.com/meltwater/drone-convert-pathschanged/ enabled, we can filter event with path in drone. Building docs will now only be triggered when documentations changed. --------- Co-authored-by: Jason Song <[email protected]>
1 parent 9a83aa2 commit c3d9a70

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

.drone.yml

+21-4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ trigger:
1212
- push
1313
- tag
1414
- pull_request
15+
paths:
16+
exclude:
17+
- docs/**
1518

1619
volumes:
1720
- name: deps
@@ -112,7 +115,6 @@ steps:
112115
image: golang:1.19 # this step is kept as the lowest version of golang that we support
113116
pull: always
114117
environment:
115-
GO111MODULE: on
116118
GOPROXY: https://goproxy.io
117119
commands:
118120
- go build -o gitea_no_gcc # test if build succeeds without the sqlite tag
@@ -124,7 +126,6 @@ steps:
124126
- name: build-backend-arm64
125127
image: golang:1.20
126128
environment:
127-
GO111MODULE: on
128129
GOPROXY: https://goproxy.io
129130
GOOS: linux
130131
GOARCH: arm64
@@ -140,7 +141,6 @@ steps:
140141
- name: build-backend-windows
141142
image: golang:1.20
142143
environment:
143-
GO111MODULE: on
144144
GOPROXY: https://goproxy.io
145145
GOOS: windows
146146
GOARCH: amd64
@@ -155,7 +155,6 @@ steps:
155155
- name: build-backend-386
156156
image: golang:1.20
157157
environment:
158-
GO111MODULE: on
159158
GOPROXY: https://goproxy.io
160159
GOOS: linux
161160
GOARCH: 386
@@ -183,6 +182,9 @@ trigger:
183182
- push
184183
- tag
185184
- pull_request
185+
paths:
186+
exclude:
187+
- docs/**
186188

187189
volumes:
188190
- name: deps
@@ -410,6 +412,9 @@ trigger:
410412
- push
411413
- tag
412414
- pull_request
415+
paths:
416+
exclude:
417+
- docs/**
413418

414419
volumes:
415420
- name: deps
@@ -517,6 +522,9 @@ depends_on:
517522
trigger:
518523
event:
519524
- pull_request
525+
paths:
526+
exclude:
527+
- docs/**
520528

521529
volumes:
522530
- name: deps
@@ -696,6 +704,9 @@ trigger:
696704
- "release/*"
697705
event:
698706
- push
707+
paths:
708+
exclude:
709+
- docs/**
699710

700711
depends_on:
701712
- testing-amd64
@@ -947,6 +958,9 @@ trigger:
947958
- push
948959
- tag
949960
- pull_request
961+
paths:
962+
include:
963+
- docs/**
950964

951965
steps:
952966
- name: build-docs
@@ -1241,6 +1255,9 @@ depends_on:
12411255
trigger:
12421256
ref:
12431257
- "refs/pull/**"
1258+
paths:
1259+
exclude:
1260+
- docs/**
12441261

12451262
steps:
12461263
- name: dryrun

0 commit comments

Comments
 (0)