PHP code example of imaginationmedia / deployer-magento2

1. Go to this page and download the library: Download imaginationmedia/deployer-magento2 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/ */

    

imaginationmedia / deployer-magento2 example snippets

json  
{
  "project": {
    "project_name": "Project Name",
    "repository_path": "[email protected]:project/repo.git",
    "git_tty" : false
  },
  "environments" : {
    "staging" : {
      "hostname" : "1.2.3.4",
      "user" : "deploy",
      "port" : "2223",
      "deploy_path" : "/home/path/to/server",
      "branch" : "staging",
      "is_production" : 0,
      "identity_file" : "~/.ssh/id_rsa",
      "languages" : "en_US",
      "php_path" : "/usr/bin/php",
      "composer_path" : "/usr/bin/composer",
      "keep_releases" : 3,
      "http_user" : "deploy",
      "slack_webhook" : "https://hooks.slack.com/services/hook/id",
      "additional_commands" : {
        "before_deploy" : [],
        "after_deploy" : [],
        "actions_before_symlink" : []
      },
      "shared_files" : [],
      "shared_dirs" : [],
      "writable_dirs" : [],
      "clear_paths" : [],
      "ignored_steps" : [],
      "composer_ignore_