#!/usr/bin/env nu
# on-deploy-completed.nu
#
# Triggered by NATS subject: evol.website.prod.deploy.completed
#
# Environment:
#   NATS_SUBJECT  — matched NATS subject string
#   NATS_PAYLOAD  — JSON payload from the publisher
#
# Expected payload shape:
#   { version: "1.2.3", commit: "abc123", deployed_by: "ci" }

let payload = $env.NATS_PAYLOAD | from json

print $"[deploy-completed] version=($payload.version? | default 'unknown') commit=($payload.commit? | default 'unknown')"
