Skip to main content
Version: 7.x

discord

Source

Installing

Require discord recipe in your deploy.php file:

require 'contrib/discord.php';

Add hook on deploy:

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

Configuration

  • discord_channel โ€“ Discord channel ID, required

  • discord_token โ€“ Discord channel token, required

  • discord_notify_text โ€“ notification message template, markdown supported, default:

    :​information_source: **{{user}}** is deploying branch `{{branch}}` to _{{target}}_
  • discord_success_text โ€“ success template, default:

    :​white_check_mark: Branch `{{branch}}` deployed to _{{target}}_ successfully
  • discord_failure_text โ€“ failure template, default:

    :​no_entry_sign: Branch `{{branch}}` has failed to deploy to _{{target}}_

Usage

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

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

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

after('deploy:success', 'discord:notify:success');

If you want to notify about failed deployment add this too:

after('deploy:failed', 'discord:notify:failure');

Configuration

discord_webhook

Source

discord_notify_text

Source

Deploy messages

discord_success_text

Source

discord_failure_text

Source

discord_message

Source

The message

Default value
'discord_notify_text'

Tasks

discord_send_message

Source

Helpers

discord:test

Source

Tests messages.

Tasks

discord:notify

Source

Notifies Discord.

discord:notify:success

Source

Notifies Discord about deploy finish.

discord:notify:failure

Source

Notifies Discord about deploy failure.



Support Deployer โค๏ธ

Hello, my name is Anton Medvedev (@antonmedv). I'm the creator of the Deployer. I maintain this open source project in my spare time. Supporters on GitHub give me extra motivation to work on the project.

Consider supporting Deployer via GitHub Sponsors.

Also, please, nominate me for GitHub Stars award. Thanks!