PHP code example of friemt / deployer-tasks

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

    

friemt / deployer-tasks example snippets


# deploy.php
# ...

import('recipe/crontab.php');
# or
import('task/crontab.php');

# See `src/examples/crontab.yaml` for a yaml based example file.
import(__DIR__ . '/<path-to-configs>/crontab.yaml');

# When using the task instead of the recipe, add the sync task to the deployment manually:
after('deploy:symlink', 'crontab:sync');

# deploy.php
# ...

import('recipe/runonce.php');
# or
import('task/runonce.php');

# See `src/examples/runonce.yaml` for a yaml based example file.
import(__DIR__ . '/<path-to-configs>/runonce.yaml');

# When using the task instead of the recipe, add the run task to the deployment manually:
after('deploy:symlink', 'runonce:run');

# deploy.php
# ...

import('recipe/template.php');
# or
import('task/template.php');

# See `src/examples/template.yaml` for a yaml based example file.
import(__DIR__ . '/<path-to-configs>/template.yaml');

# When using the task instead of the recipe, add the sync task to the deployment manually:
after('deploy:symlink', 'template:sync');

# deploy.php
# ...

import('recipe/cleanup.php');
# or
import('task/cleanup.php');

# When using the task instead of the recipe, add the run task to the deployment manually:
after('deploy', 'cleanup:paths');

# deploy.php
# ...

import('recipe/symlink.php');
# or
import('task/symlink.php');

# When using the task instead of the recipe, add the run task to the deployment manually:
before('deploy:shared', 'symlink:create');

# deploy.php
# ...

import('recipe/supervisor.php');
# or
import('task/supervisor.php');

# When using the task instead of the recipe, add the run task to the deployment manually:
before('deploy:publish', 'supervisor:stop');
after('deploy:publish', 'supervisor:start');