@@ -21,7 +21,7 @@ It does auto deploy your site to hosting
21
21
<?php
22
22
require_once 'vendor/autoload.php';
23
23
// Add secret code in the first parameter for protection
24
- \optimistex\deploy\GitHelper::run ('ytJHvMHFdTYUryDhmJkjFjFiYk');
24
+ (new \optimistex\deploy\DeployApplication ('ytJHvMHFdTYUryDhmJkjFjFiYk'))->run( );
25
25
```
26
26
27
27
3. Configure WebHook for send request to:
@@ -39,19 +39,17 @@ For extended deployment make the file ``deploy.php`` with code:
39
39
```php
40
40
<?php
41
41
42
- use optimistex\deploy\ShellHelper;
43
42
use optimistex\deploy\DeployApplication;
44
43
45
44
require_once 'vendor/autoload.php';
46
45
47
- $app = new DeployApplication('security_key');
48
- $app->begin();
49
- $app->execute([ // executing custom commands
50
- 'git branch',
51
- 'git pull',
52
- ShellHelper::php() . ' composer.phar install', // install packages
46
+ (new DeployApplication('security_key'))->run([ // executing custom commands
47
+ 'git branch', // equal: $ git branch
48
+ 'git pull', // equal: $ git pull
49
+ 'php' => 'composer.phar install', // equal: $ php composer.phar install
50
+ ['php' => 'yii migrate --interactive=0'], // equal: $ php yii migrate --interactive=0
53
51
]);
54
- $app->end();
55
52
```
56
53
57
- `` ShellHelper::php() `` - equal `` php `` , but used becouse just "php" not working!
54
+ That `` 'php' => 'composer.phar install' `` used for expanding "php" to absolute path.
55
+ There is required an absolute path because just "php" don't working by relative path!
0 commit comments