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 <i@wolfogre.com>
This commit is contained in:
Lunny Xiao 2023-02-20 21:08:41 +08:00 committed by GitHub
parent 9a83aa28a3
commit c3d9a70d0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 21 additions and 4 deletions

View File

@ -12,6 +12,9 @@ trigger:
- push - push
- tag - tag
- pull_request - pull_request
paths:
exclude:
- docs/**
volumes: volumes:
- name: deps - name: deps
@ -112,7 +115,6 @@ steps:
image: golang:1.19 # this step is kept as the lowest version of golang that we support image: golang:1.19 # this step is kept as the lowest version of golang that we support
pull: always pull: always
environment: environment:
GO111MODULE: on
GOPROXY: https://goproxy.io GOPROXY: https://goproxy.io
commands: commands:
- go build -o gitea_no_gcc # test if build succeeds without the sqlite tag - go build -o gitea_no_gcc # test if build succeeds without the sqlite tag
@ -124,7 +126,6 @@ steps:
- name: build-backend-arm64 - name: build-backend-arm64
image: golang:1.20 image: golang:1.20
environment: environment:
GO111MODULE: on
GOPROXY: https://goproxy.io GOPROXY: https://goproxy.io
GOOS: linux GOOS: linux
GOARCH: arm64 GOARCH: arm64
@ -140,7 +141,6 @@ steps:
- name: build-backend-windows - name: build-backend-windows
image: golang:1.20 image: golang:1.20
environment: environment:
GO111MODULE: on
GOPROXY: https://goproxy.io GOPROXY: https://goproxy.io
GOOS: windows GOOS: windows
GOARCH: amd64 GOARCH: amd64
@ -155,7 +155,6 @@ steps:
- name: build-backend-386 - name: build-backend-386
image: golang:1.20 image: golang:1.20
environment: environment:
GO111MODULE: on
GOPROXY: https://goproxy.io GOPROXY: https://goproxy.io
GOOS: linux GOOS: linux
GOARCH: 386 GOARCH: 386
@ -183,6 +182,9 @@ trigger:
- push - push
- tag - tag
- pull_request - pull_request
paths:
exclude:
- docs/**
volumes: volumes:
- name: deps - name: deps
@ -410,6 +412,9 @@ trigger:
- push - push
- tag - tag
- pull_request - pull_request
paths:
exclude:
- docs/**
volumes: volumes:
- name: deps - name: deps
@ -517,6 +522,9 @@ depends_on:
trigger: trigger:
event: event:
- pull_request - pull_request
paths:
exclude:
- docs/**
volumes: volumes:
- name: deps - name: deps
@ -696,6 +704,9 @@ trigger:
- "release/*" - "release/*"
event: event:
- push - push
paths:
exclude:
- docs/**
depends_on: depends_on:
- testing-amd64 - testing-amd64
@ -947,6 +958,9 @@ trigger:
- push - push
- tag - tag
- pull_request - pull_request
paths:
include:
- docs/**
steps: steps:
- name: build-docs - name: build-docs
@ -1241,6 +1255,9 @@ depends_on:
trigger: trigger:
ref: ref:
- "refs/pull/**" - "refs/pull/**"
paths:
exclude:
- docs/**
steps: steps:
- name: dryrun - name: dryrun