From 41acb316c85d4c99bf33ba6f0425676997dcfb80 Mon Sep 17 00:00:00 2001 From: Timon de Groot Date: Tue, 20 Jan 2026 16:33:46 +0100 Subject: [PATCH] Hypernode Deploy v4.7.0 release These changes are related to the Hypernode Deploy v4.7.0 release. --- .../applications/config-for-magento-2.md | 86 ++++++++++++++++++- .../getting-started/configure-ci-cd.md | 10 +++ 2 files changed, 93 insertions(+), 3 deletions(-) diff --git a/docs/hypernode-deploy/applications/config-for-magento-2.md b/docs/hypernode-deploy/applications/config-for-magento-2.md index fa9a3c5b..d182b130 100644 --- a/docs/hypernode-deploy/applications/config-for-magento-2.md +++ b/docs/hypernode-deploy/applications/config-for-magento-2.md @@ -32,16 +32,71 @@ Done. Config types dumped: scopes, themes ## Advanced -However, for advanced configurations you can override most steps and variables set my Hypernode Deploy: +However, for advanced configurations you can override most steps and variables set by Hypernode Deploy: ### Static Content Locales -When the deployer runs `bin/magento static-content:deploy` it will require locales to know what to build, this variable is set for this. It is included when you run `new ApplicationTemplate\Magento2` or can be overriden with: +When the deployer runs `bin/magento static-content:deploy` it will require locales to know what to build, this variable is set for this. It is included when you run `new ApplicationTemplate\Magento2` or can be overridden with: ```php -$this->setVariable('static_content_locales', 'nl_NL en_US'); +$configuration->setVariable('static_content_locales', 'nl_NL en_US'); ``` +### Magento Themes and Split Static Deployment + +For large stores with multiple themes and locales, you can use `setMagentoThemes()` to define specific themes and enable split static deployment for better build performance: + +```php +setMagentoThemes(['Vendor/theme1', 'Vendor/theme2']); + +// Option 2: Themes with specific locales per theme +$configuration->setMagentoThemes([ + 'Vendor/theme1' => 'nl_NL en_US', + 'Vendor/theme2' => 'de_DE' +]); + +return $configuration; +``` + +**Parameters:** + +- `$themes` - Array of themes as `['vendor/theme', ...]` or with locale mapping `['vendor/theme' => 'nl_NL en_US', ...]` +- `$allowSplitStaticDeployment` (optional, default: `true`) - Enables split static deployment for better build performance + +### Magento Backend Themes + +If you're using custom admin themes or need to deploy backend static content separately, use the `setMagentoBackendThemes()` method: + +```php +setMagentoThemes([ + 'Vendor/theme1' => 'nl_NL en_US', + 'Vendor/theme2' => 'de_DE' +]); + +// Set backend themes separately +$configuration->setMagentoBackendThemes([ + 'Vendor/admin-theme' => 'nl_NL en_US' +]); + +return $configuration; +``` + +This automatically enables split static deployment for optimal build performance. + ### Defining custom steps You potentially need to add custom steps to the deployment, for example to build npm assets or do server actions after deployment. @@ -83,3 +138,28 @@ If you add these folders be aware that your new folders will be empty on your fi ```php $configuration->addSharedFolder('var/reports'); ``` + +### OPcache Clearing + +By default, Hypernode Deploy does **not** automatically clear the OPcache after deployment. This is because the Hypernode platform has `validate_timestamps` enabled, which automatically invalidates cached PHP files when they change. + +If you're deploying to a Hypernode server which has `validate_timestamps` disabled, you can manually enable OPcache clearing by adding the following to your `deploy.php`: + +```php + Secrets -> Actions**. Click the **New repository secret**, fill in `DEPLOY_COMPOSER_AUTH` as the name, paste the contents of your `auth.json` file and press **Save**. +````{note} +The `DEPLOY_COMPOSER_AUTH` variable accepts both raw JSON and base64-encoded JSON. If you're having trouble with special characters in your CI/CD system, you can base64-encode the contents: + +```bash +base64 -w0 < auth.json +``` + +This produces a single-line encoded string that's safer for environment variables. +```` + ### Hypernode API authentication ***Optional step***