Skip to content

Commit 40be385

Browse files
committed
Run craft up on deploy so content migrations see project config
1 parent 453cca8 commit 40be385

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

docs/recipe/craftcms.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,24 @@ Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `r
100100

101101
## Tasks
102102

103+
### craft\:up {#craft-up}
104+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/craftcms.php#L89)
105+
106+
Applies pending migrations and project config changes.
107+
108+
Combined update
109+
110+
103111
### craft\:gc {#craft-gc}
104-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/craftcms.php#L120)
112+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/craftcms.php#L127)
105113

106114
Runs garbage collection.
107115

108116
Garbage collection
109117

110118

111119
### deploy {#deploy}
112-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/craftcms.php#L127)
120+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/craftcms.php#L134)
113121

114122
Deploys Craft CMS.
115123

recipe/craftcms.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@ function craft($command, $options = [])
8181
desc('Applies project config file changes.');
8282
task('craft:project-config/apply', craft('project-config/apply'));
8383

84+
/*
85+
* Combined update
86+
*/
87+
88+
desc('Applies pending migrations and project config changes');
89+
task('craft:up', craft('up'));
90+
8491
/*
8592
* Caches
8693
*/
@@ -128,8 +135,7 @@ function craft($command, $options = [])
128135
'deploy:prepare',
129136
'deploy:vendors',
130137
'craft:clear-caches/compiled-classes',
131-
'craft:migrate/all',
132-
'craft:project-config/apply',
138+
'craft:up',
133139
'craft:gc',
134140
'craft:clear-caches/all',
135141
'deploy:publish',

0 commit comments

Comments
 (0)