11<?php
22/**
33 * Deployer configuration.
4+ *
5+ * THIS FILE IS AUTO-GENERATED. DO NOT EDIT THIS FILE.
6+ * Source: https://github.com/wearerequired/composer-deployer
47 */
58
69namespace Deployer ;
710
811require 'recipe/common.php ' ;
912
10- inventory ( ' deploy.yml ' );
11-
13+ // Default options.
14+ set ( ' allow_anonymous_stats ' , false );
1215set ( 'default_stage ' , 'staging ' );
16+ set (
17+ 'composer_options ' ,
18+ function () {
19+ $ production = 'production ' === get ( 'stage ' );
20+ return sprintf (
21+ '{{composer_action}} --verbose --prefer-dist --no-progress --no-interaction %s --optimize-autoloader --no-suggest ' ,
22+ $ production ? '--no-dev ' : ''
23+ );
24+ }
25+ );
26+
27+ // Load options and hosts from inventory.
28+ inventory ( 'deploy.yml ' );
1329
1430// Tasks.
31+ desc ( 'Install WordPress translations ' );
1532task (
1633 'wp:install_translations ' ,
1734 function () {
@@ -27,6 +44,7 @@ function () {
2744 }
2845);
2946
47+ desc ( 'Update WordPress translations ' );
3048task (
3149 'wp:update_translations ' ,
3250 function () {
@@ -41,6 +59,10 @@ function () {
4159 }
4260);
4361
62+ desc ( 'Install and update WordPress translations ' );
63+ task ( 'wp:translations ' , [ 'wp:install_translations ' , 'wp:update_translations ' ] );
64+
65+ desc ( 'Clear OPcache ' );
4466task (
4567 'wp:opcache_clear ' ,
4668 function () {
@@ -56,8 +78,6 @@ function () {
5678 }
5779);
5880
59- task ( 'wp:translations ' , [ 'wp:install_translations ' , 'wp:update_translations ' ] );
60-
6181desc ( 'Deploy your project ' );
6282task (
6383 'deploy ' ,
0 commit comments