mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-24 17:22:41 +01:00
3.6 KiB
3.6 KiB
workplace
Installing
This recipes works with Custom Integrations and Publishing Bots.
Require the new recipe into your deploy.php
require 'contrib/workplace.php';
Add hook on deploy:
before('deploy', 'workplace:notify');
Configuration
-
workplace_webhook
- incoming workplace webhook required// With custom integration set('workplace_webhook', 'https://graph.facebook.com/<GROUP_ID>/feed?access_token=<ACCESS_TOKEN>'); // With publishing bot set('workplace_webhook', 'https://graph.facebook.com/v3.0/group/feed?access_token=<ACCESS_TOKEN>'); // Use markdown on message set('workplace_webhook', 'https://graph.facebook.com/<GROUP_ID>/feed?access_token=<ACCESS_TOKEN>&formatting=MARKDOWN');
-
workplace_text
- notification messageset('workplace_text', '_{{user}}_ deploying `{{branch}}` to *{{target}}*');
-
workplace_success_text
– success template, default:
set('workplace_success_text', 'Deploy to *{{target}}* successful');
workplace_failure_text
– failure template, default:
set('workplace_failure_text', 'Deploy to *{{target}}* failed');
workplace_edit_post
– whether to create a new post for deploy result, or edit the first one created, default creates a new post:
set('workplace_edit_post', false);
Usage
If you want to notify only about beginning of deployment add this line only:
before('deploy', 'workplace:notify');
If you want to notify about successful end of deployment add this too:
after('deploy:success', 'workplace:notify:success');
If you want to notify about failed deployment add this too:
after('deploy:failed', 'workplace:notify:failure');
- Config
- Tasks
workplace:notify
— Notifying Workplaceworkplace:notify:success
— Notifying Workplace about deploy finishworkplace:notify:failure
— Notifying Workplace about deploy failure
Config
workplace_text
Deploy message
workplace_success_text
workplace_failure_text
workplace_edit_post
By default, create a new post for every message