From 4d8c3cc0b44fa1af8049b8fc96fc868119322925 Mon Sep 17 00:00:00 2001 From: kasun Date: Fri, 27 Nov 2026 21:43:02 +0100 Subject: [PATCH 1/2] feature(ci): deploy stacks on push to main --- .gitea/workflows/deploy-stacks.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitea/workflows/deploy-stacks.yaml b/.gitea/workflows/deploy-stacks.yaml index 1be0e46..8118fb8 100644 --- a/.gitea/workflows/deploy-stacks.yaml +++ b/.gitea/workflows/deploy-stacks.yaml @@ -2,6 +2,16 @@ name: Deploy Stacks on: workflow_dispatch: + push: + branches: + - main + paths: + - stacks/** + - roles/docker_stack/** + - playbooks/docker_stacks.yml + - inventory/** + - collections/requirements.yml + - .gitea/workflows/deploy-stacks.yaml jobs: deploy-stacks: From 48529719916505ae6df2a463b1040fc390f2bcbd Mon Sep 17 00:00:00 2001 From: kasun Date: Fri, 27 Nov 2026 21:43:06 +0100 Subject: [PATCH 2/2] docs: note that merging a stack change deploys it --- .claude/skills/merge/SKILL.md | 2 +- CLAUDE.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.claude/skills/merge/SKILL.md b/.claude/skills/merge/SKILL.md index 595f4dc..1338d18 100644 --- a/.claude/skills/merge/SKILL.md +++ b/.claude/skills/merge/SKILL.md @@ -105,7 +105,7 @@ Keep it short: - PR link and commits. - The review result, with any pre-existing findings or nits worth a follow-up. -- What the merge triggers, from `on.push` in `.gitea/workflows/`. Today no workflow deploys on merge; say so until that changes. +- What the merge triggers, from `on.push` in `.gitea/workflows/`. Say whether the PR touched a `deploy-stacks.yaml` path, and so deployed. - Anything left uncommitted. Do not delete the branch, dispatch a workflow, or change a live system. diff --git a/CLAUDE.md b/CLAUDE.md index e41ad08..91dd599 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -42,7 +42,7 @@ Only commit when I explicitly say "commit" for that change. A yes to a question The remote is a self-hosted Gitea, so `gh` doesn't work. For PRs and their CI status use `.claude/scripts/gitea.sh` (acts as `claude-bot`), e.g. `.claude/scripts/gitea.sh GET '/repos/kasun/homelab-ansible/pulls?state=open'`. Use it for PRs, and for issues when I ask. Reading from Gitea is free. -Open and merge PRs through `/merge`: typing it is my OK to commit, open a PR and merge for that run. Outside `/merge`, ask first. Every merge call asks for permission (also inside `/merge`), and `.claude/hooks/guard-merge.sh` refuses it unless the PR's newest review comment is a pass for its head commit. Before deploy-on-merge is enabled, revisit this: PRs that deploy will need my approval. +Open and merge PRs through `/merge`: typing it is my OK to commit, open a PR and merge for that run. Outside `/merge`, ask first. Every merge call asks for permission (also inside `/merge`), and `.claude/hooks/guard-merge.sh` refuses it unless the PR's newest review comment is a pass for its head commit. Merging deploys: a push to `main` that touches the paths in `.gitea/workflows/deploy-stacks.yaml` runs the stacks playbook, so allowing the merge prompt is also my OK to deploy. ## Verifying changes