jsonBody([ "topic" => get('ntfy_topic'), "title" => get('ntfy_title'), "message" => get('ntfy_text'), "tags" => explode(",", get('ntfy_tags')), "priority" => get('ntfy_priority'), ])->send(); }) ->once() ->hidden(); desc('Notifies ntfy server about deploy finish'); task('ntfy:notify:success', function () { if (!get('ntfy_topic', false)) { warning('No ntfy topic configured'); return; } Httpie::post(get('ntfy_server'))->jsonBody([ "topic" => get('ntfy_topic'), "title" => get('ntfy_title'), "message" => get('ntfy_success_text'), "tags" => explode(",", get('ntfy_success_tags')), "priority" => get('ntfy_success_priority'), ])->send(); }) ->once() ->hidden(); desc('Notifies ntfy server about deploy failure'); task('ntfy:notify:failure', function () { if (!get('ntfy_topic', false)) { warning('No ntfy topic configured'); return; } Httpie::post(get('ntfy_server'))->jsonBody([ "topic" => get('ntfy_topic'), "title" => get('ntfy_title'), "message" => get('ntfy_failure_text'), "tags" => explode(",", get('ntfy_failure_tags')), "priority" => get('ntfy_failure_priority'), ])->send(); }) ->once() ->hidden();