Skip to content

Commit d2829f4

Browse files
committed
chore(workflows): skip deploy when release bot pushes to main
The n3ary release bot opens release/calver-* PRs on every PR merge to main. The PR auto-merges and lands a version-only commit on main; the push event then fires with github.actor = n3ary-release-bot[bot]. deploy-production.yml triggers on push: branches: [main] (with paths-ignore for CHANGELOG.md). It was not filtered to skip the bot, so it ran on every release bump. The bump commit is a no-op (just package.json#version), so re-deploying is wasteful. Add a job-level guard: skip when github.actor == "n3ary-release-bot[bot]". Manual workflow_dispatch still works (actor != bot). The release bot itself never pushes anything other than a version bump, so this is safe. Refs: n3ary/standards#22
1 parent 6d22061 commit d2829f4

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎.github/workflows/deploy-pwa.yml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ permissions:
3232

3333
jobs:
3434
deploy:
35+
# Skip deploy when the release bot (n3ary-release-bot) is the actor.
36+
# The bot's release/calver-* PRs land on main as a squash merge; the
37+
# `push` event fires with `github.actor = n3ary-release-bot[bot]`.
38+
# Deploying a version-only commit would re-run a deploy whose
39+
# artefact is byte-identical to the previous one. The release bot
40+
# bumps `package.json#version`; nothing else changes.
41+
if: github.actor != 'n3ary-release-bot[bot]'
3542
runs-on: ubuntu-latest
3643

3744
steps:

0 commit comments

Comments
 (0)