From baf1992b0e129d69631108f90b66a2f28c4025b4 Mon Sep 17 00:00:00 2001 From: sjat Date: Wed, 27 May 2026 11:24:29 +0200 Subject: [PATCH] ci(docs): notify ntfy when main build fails Adds an `if: failure()` step that POSTs to ntfy.sh on a failed push-to-main run. Topic comes from the NTFY_TOPIC secret so it stays out of the public repo; missing secret silently no-ops via `|| true`. Co-Authored-By: Claude Opus 4.7 (1M context) --- .forgejo/workflows/docs.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.forgejo/workflows/docs.yml b/.forgejo/workflows/docs.yml index a453130..5215f75 100644 --- a/.forgejo/workflows/docs.yml +++ b/.forgejo/workflows/docs.yml @@ -46,3 +46,16 @@ jobs: - name: Publish to /output (main only) if: github.ref == 'refs/heads/main' && github.event_name == 'push' run: rsync -a --delete site/ /output/ + + - name: Notify ntfy on failure + if: failure() && github.ref == 'refs/heads/main' && github.event_name == 'push' + run: | + curl -sf \ + -H "Title: docs.makerfloss.eu build failed" \ + -H "Priority: high" \ + -H "Tags: warning,rotating_light" \ + -d "Run #${{ github.run_number }} on ${{ github.ref_name }}@${{ github.sha }} + ${{ github.event.head_commit.message }} + + ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \ + "https://ntfy.sh/${{ secrets.NTFY_TOPIC }}" || true