Skip to content
Discussion options

You must be logged in to vote

How do you run it? Run just before provision:

For me settings are preserved:

<?php

namespace Deployer;

localhost();

task('customtask', function () {
    $php_version = '8.4';
    $db_type = 'mysql';
    currentHost()->set('hostname', function () {
        return ask(' Enter the domain or ip of your server: ');
    });
    currentHost()->set('php_version', $php_version);
    currentHost()->set('db_type', $db_type);
});

task('provision', function () {
    writeln('Provisioning... {{php_version}}');
});

task('deploy', ['customtask', 'provision']);

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@devjk1
Comment options

@antonmedv
Comment options

Answer selected by devjk1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants