Skip to content
This repository has been archived by the owner on Apr 26, 2020. It is now read-only.

Latest commit

 

History

History
51 lines (37 loc) · 1.21 KB

telegram.md

File metadata and controls

51 lines (37 loc) · 1.21 KB

Telegram recipe

Installing

  1. Create telegram bot with BotFather and grab the token provided
  2. Send /start to your bot and open https://api.telegram.org/bot{$TELEGRAM_TOKEN_HERE}/getUpdates
  3. Take chat_id from response Require telegram recipe in your deploy.php file:
require 'recipe/telegram.php';

Add hook on deploy:

before('deploy', 'telegram:notify');

Configuration

  • telegram_token – telegram bot token, required
  • telegram_chat_id — chat ID to push messages to
  • telegram_title – the title of application, default {{application}}
  • telegram_text – notification message template
    _{{user}}_ deploying `{{branch}}` to *{{target}}*
    
  • telegram_success_text – success template, default:
    Deploy to *{{target}}* successful
    

Tasks

  • telegram:notify – send message to telegram
  • telegram:notify:success – send success message to telegram

Usage

If you want to notify only about beginning of deployment add this line only:

before('deploy', 'telegram:notify');

If you want to notify about successful end of deployment add this too:

after('success', 'telegram:notify:success');