Skip to content

Commit c940f6c

Browse files
committed
update readme
1 parent f78cfb7 commit c940f6c

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ It does auto deploy your site to hosting
2121
<?php
2222
require_once 'vendor/autoload.php';
2323
// Add secret code in the first parameter for protection
24-
\optimistex\deploy\GitHelper::run('ytJHvMHFdTYUryDhmJkjFjFiYk');
24+
(new \optimistex\deploy\DeployApplication('ytJHvMHFdTYUryDhmJkjFjFiYk'))->run();
2525
```
2626

2727
3. Configure WebHook for send request to:
@@ -39,19 +39,17 @@ For extended deployment make the file ``deploy.php`` with code:
3939
```php
4040
<?php
4141

42-
use optimistex\deploy\ShellHelper;
4342
use optimistex\deploy\DeployApplication;
4443

4544
require_once 'vendor/autoload.php';
4645

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
5351
]);
54-
$app->end();
5552
```
5653

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

Comments
 (0)