PHP code example of dersonsena / yii2-deploy
1. Go to this page and download the library: Download dersonsena/yii2-deploy library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dersonsena / yii2-deploy example snippets
'modules' => [
...
'deploy' => [
'class' => 'dersonsena\deploy\DeployModule',
'token' => '<INSIRA UM TOKEN AQUI>',
],
...
]
echo \Yii::$app->security->generateRandomString()
'modules' => [
...
'deploy' => [
'class' => 'dersonsena\deploy\DeployModule',
'token' => '<SEU TOKEN>',
'branch' => 'meu-branch'
],
...
]
'modules' => [
...
'deploy' => [
'class' => 'dersonsena\deploy\DeployModule',
'token' => '<SEU TOKEN>',
'forceExecuteCommands' => true
],
...
]
'modules' => [
...
'deploy' => [
'class' => 'dersonsena\deploy\DeployModule',
'token' => '<SEU TOKEN>',
'enableComposer' => true // Padrão: true
'gitBin' => '/usr/bin/git', // Caminho para o comando git do servidor (Padrão: /usr/bin/git)
'phpBin' => '/usr/bin/php', // Caminho para o comando php do servidor (Padrão: /usr/bin/php)
'composerBin' => '/usr/bin/composer' // Caminho para o comando composer do servidor (Padrão: /usr/bin/composer),
'composerHome' => '/path/to/.composer' // Caminho para o COMPOSER_HOME (Padrão: null)
],
...
]
$ php composer.phar
config/web.php
config/web.php
config/web.php