bilbofox / deploy
Simple deploy toolkit for projects.
0.1
2026-08-14 15:52 UTC
Requires
- php: ^8.1
- ext-zip: *
- guzzlehttp/guzzle: ^7 || ^8
- league/flysystem: ^3.24
- nette/utils: ^4.1
- scriptfusion/byte-formatter: ^4
This package is auto-updated.
Last update: 2026-08-14 15:54:20 UTC
README
This is a simple deploy toolkit for projects using various strategies represented by different commands.
Installation:
composer require bilbofox/deploy
DeployByPack
This command packages specified project files into pack (archive) and then uploads it to remote storage. Then calls remote hook for processing uploaded pack - on remote app built from package.
Example of usage:
use Bilbofox\Deploy\DeployByPack; use Bilbofox\Deploy\PackBuilder; use League\Flysystem\Filesystem; require __DIR__ . '/../vendor/autoload.php'; // --------------------------------------------------------------------------- // Storage configuration $storage = new Filesystem(...); // --------------------------------------------------------------------------- // Pack-builder configuration $projectRootDir = '/path/to/project/root'; $deployInfo = 'Time: ' . date_create()->format('Y-m-d H:i:s') . "\n"; $deployInfo .= 'Git: ' . exec('git branch -v') . "\n"; $packBuilder = new PackBuilder($projectRootDir) ->include(['app', 'bin', 'vendor']) ->exclude(['app/secret.config']) ->excludeMasks(['.git']) ->addEmptyDirs(['temp', 'log']) ->addCustomFile('.deploy-info', $deployInfo); // --------------------------------------------------------------------------- // Deploy run $deployByPack = new DeployByPack( deployUrl: 'https://my-remote-app.com/deploy/', remoteDeployTarget: 'www/projects/my-project', remotePacksDir: 'www/deploy/packs', storage: $storage, packBuilder: $packBuilder, ); $deployByPack->useEchoOutput(); $deployByPack->run();
Notes:
- Storage is object from library league/flysystem
PackBuilderis internal class for specifying project files to pack- Remote app using package bilbofox/deploy-remote must be running on the server where we're deploying a project