1 Star 0 Fork 144

十年砍材/laravel-bjyblog

forked from 白俊遥/laravel-bjyblog 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Envoy.blade.php 887 Bytes
一键复制 编辑 原始数据 按行查看 历史
白俊遥 提交于 2020-03-24 23:33 . PHP dotenv v4 compatibility
@setup
require __DIR__.'/vendor/autoload.php';
$dotenv = Dotenv\Dotenv::create(Illuminate\Support\Env::getRepository(), __DIR__);
try {
$dotenv->load();
$dotenv->required(['DEPLOY_IP', 'DEPLOY_PORT', 'DEPLOY_USER', 'DEPLOY_PATH', 'DEPLOY_BRANCH'])->notEmpty();
} catch ( Exception $e ) {
echo $e->getMessage();
}
$ip = getenv('DEPLOY_IP');
$port = getenv('DEPLOY_PORT');
$user = getenv('DEPLOY_USER');
$path = getenv('DEPLOY_PATH');
$branch = getenv('DEPLOY_BRANCH');
if ( substr($path, 0, 1) !== '/' ) throw new Exception('Must be an absolute path');
$path = rtrim($path, '/');
@endsetup
@servers(['web' => ["$user@$ip -p $port"]])
@task('deploy', ['on' => 'web'])
cd {{ $path }}
git pull origin {{ $branch }}
composer install --no-dev --optimize-autoloader
php artisan bjyblog:update
@endtask
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/JackZhang_2016/laravel-bjyblog.git
[email protected]:JackZhang_2016/laravel-bjyblog.git
JackZhang_2016
laravel-bjyblog
laravel-bjyblog
master

搜索帮助