Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,28 @@ public function filesPush(string $destination, $options = ['exclude' => null, 'd
return $this->rsyncPush("{$destination}:%files", $options);
}

/**
* Pull plugins directory from remote to local.
*
* @param string $source Source alias eg. `production`
* @return \Robo\Result
*/
public function pluginsPull(string $source, $options = ['exclude' => null, 'dry-run' => false, 'options' => null])
{
return $this->rsyncPull("{$source}:web/app/plugins/", $options);
}

/**
* Push uploads directory from local to remote.
*
* @param string $destination Destination alias eg. `production`
* @return \Robo\Result
*/
public function pluginsPush(string $destination, $options = ['exclude' => null, 'dry-run' => true, 'options' => null])
{
return $this->rsyncPush("{$destination}:web/app/plugins/", $options);
}

// You can override common tasks by overloading their functions in this file. Eg.
//
// public function buildDevelopment($options = ['npm-script' => 'build'])
Expand Down
5 changes: 3 additions & 2 deletions config/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,15 @@
/**
* Custom Settings
*/
// Set to false to manage updates in WordPress and edit deploy.php
Config::define('AUTOMATIC_UPDATER_DISABLED', true);
defined('DISABLE_WP_CRON') or Config::define('DISABLE_WP_CRON', env('DISABLE_WP_CRON') ?: false);
Config::define('WP_POST_REVISIONS', 10);
Config::define('WP_DEFAULT_THEME', 'gds');
// Disable the plugin and theme file editor in the admin
Config::define('DISALLOW_FILE_EDIT', true);
Config::define('DISALLOW_FILE_EDIT', Config::get('AUTOMATIC_UPDATER_DISABLED'));
// Disable plugin and theme updates and installation from the admin
Config::define('DISALLOW_FILE_MODS', true);
Config::define('DISALLOW_FILE_MODS', Config::get('AUTOMATIC_UPDATER_DISABLED'));
// Avoid using event attempting FTP updates
Config::define('FS_METHOD', 'direct');
// Disable ACF Admin UI when in production
Expand Down
11 changes: 10 additions & 1 deletion deploy.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@
set('ssh_multiplexing', true);

set('shared_files', ['.env']);
set('shared_dirs', ['web/app/uploads']);
set('shared_dirs', [
'web/app/uploads',
// @note allow WordPress to manage updates
// 'web/wp',
// 'web/app/plugins',
]);
set('writable_dirs', ['web/app/cache', ...get('shared_dirs')]);
set('writable_mode', 'chmod');
set('writable_use_sudo', false);
Expand Down Expand Up @@ -67,6 +72,10 @@
'/*.php',
'/*.xml',
'/*.yml',
// @note to allow automatically updated plugins, uncomment this after the
// first deploy
// '/web/wp',
// '/web/app/plugins',
]);

/**
Expand Down