From 90d98893f548f5143c69f438d08b89e08d539ac9 Mon Sep 17 00:00:00 2001 From: zhangwenjian Date: Sat, 29 Aug 2026 14:29:05 +0800 Subject: [PATCH] =?UTF-8?q?ci=F0=9F=94=A7:=20skip=20the=20deploy=20workflo?= =?UTF-8?q?w=20for=20documentation-only=20changes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A push to master here does not just build: it pushes an image, runs the migrations and restarts the demo container, so the site takes a short outage each time. The last two merges were markdown only and both paid for it. Beyond the waste, a deploy can fail for reasons unrelated to the change that triggered it - a container that will not come up, a database that is briefly unreachable - and a README edit should not be able to turn the demo red. Only build.yml is filtered. go.yml still builds on every push and pull request, so nothing loses its compile check, and the badge keeps reporting the same workflow it reports today. --- .github/workflows/build.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0f3c0e8d..5417fad0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,10 +1,27 @@ name: Build +# Documentation-only changes skip this workflow entirely. +# +# A push to master here does not just build - it pushes an image, runs the +# migrations and restarts the demo container, so the site takes a short outage. +# Paying that for a README edit is waste at best; at worst a deploy fails for a +# reason unrelated to anything in the change. Code coverage is unaffected, +# because go.yml still builds every push and pull request. on: push: branches: [ master ] + paths-ignore: + - '**.md' + - 'docs/**' + - 'LICENSE*' + - '.github/ISSUE_TEMPLATE/**' pull_request: branches: [ master ] + paths-ignore: + - '**.md' + - 'docs/**' + - 'LICENSE*' + - '.github/ISSUE_TEMPLATE/**' # One deploy at a time. Two merges seconds apart raced here: both runs did # docker rm -f then docker run, the second removed the container the first had