Skip to content

Commit 0e11a75

Browse files
author
Jonathan Visser
committed
Add definining custom steps to the hypernode deploy magento 2 docs
1 parent 42183b7 commit 0e11a75

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/hypernode-deploy/applications/config-for-magento-2.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,24 @@ When the deployer runs `bin/magento static-content:deploy` it will require local
3131
$this->setVariable('static_content_locales', 'nl_NL en_US');
3232
```
3333

34+
### Defining custom steps
35+
36+
You potentially need to add custom steps to the deployment, for example to build npm assets or do server actions after deployment.
37+
38+
```php
39+
task('node:install', static function () {
40+
run("npm ci");
41+
});
42+
43+
task('node:build', static function () {
44+
run('npm run build');
45+
});
46+
47+
// Add builder task to run in the pipeline, use addDeployTask to run on the server
48+
$configuration->addBuildTask('node:install');
49+
$configuration->addBuildTask('node:build');
50+
```
51+
3452
### Shared Files
3553

3654
Hypernode Deploy deploys to a new folder for every deployment, this way you compare changes, and roll back small releases. There are however some files and folders that need to be present throughout releases. Therefor we have `shared_files` and `shared_folders`. These are symlinked files and folders that are made in a shared directory and get symbolic linked between releases.

0 commit comments

Comments
 (0)