Skip to content

Commit 41acb31

Browse files
committed
Hypernode Deploy v4.7.0 release
These changes are related to the Hypernode Deploy v4.7.0 release.
1 parent 7dcc204 commit 41acb31

File tree

2 files changed

+93
-3
lines changed

2 files changed

+93
-3
lines changed

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

Lines changed: 83 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,71 @@ Done. Config types dumped: scopes, themes
3232

3333
## Advanced
3434

35-
However, for advanced configurations you can override most steps and variables set my Hypernode Deploy:
35+
However, for advanced configurations you can override most steps and variables set by Hypernode Deploy:
3636

3737
### Static Content Locales
3838

39-
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:
39+
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:
4040

4141
```php
42-
$this->setVariable('static_content_locales', 'nl_NL en_US');
42+
$configuration->setVariable('static_content_locales', 'nl_NL en_US');
4343
```
4444

45+
### Magento Themes and Split Static Deployment
46+
47+
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:
48+
49+
```php
50+
<?php
51+
52+
namespace Hypernode\DeployConfiguration;
53+
54+
$configuration = new ApplicationTemplate\Magento2(['en_US']);
55+
56+
// Option 1: Simple theme list (uses all configured locales)
57+
$configuration->setMagentoThemes(['Vendor/theme1', 'Vendor/theme2']);
58+
59+
// Option 2: Themes with specific locales per theme
60+
$configuration->setMagentoThemes([
61+
'Vendor/theme1' => 'nl_NL en_US',
62+
'Vendor/theme2' => 'de_DE'
63+
]);
64+
65+
return $configuration;
66+
```
67+
68+
**Parameters:**
69+
70+
- `$themes` - Array of themes as `['vendor/theme', ...]` or with locale mapping `['vendor/theme' => 'nl_NL en_US', ...]`
71+
- `$allowSplitStaticDeployment` (optional, default: `true`) - Enables split static deployment for better build performance
72+
73+
### Magento Backend Themes
74+
75+
If you're using custom admin themes or need to deploy backend static content separately, use the `setMagentoBackendThemes()` method:
76+
77+
```php
78+
<?php
79+
80+
namespace Hypernode\DeployConfiguration;
81+
82+
$configuration = new ApplicationTemplate\Magento2(['en_US']);
83+
84+
// Set frontend themes
85+
$configuration->setMagentoThemes([
86+
'Vendor/theme1' => 'nl_NL en_US',
87+
'Vendor/theme2' => 'de_DE'
88+
]);
89+
90+
// Set backend themes separately
91+
$configuration->setMagentoBackendThemes([
92+
'Vendor/admin-theme' => 'nl_NL en_US'
93+
]);
94+
95+
return $configuration;
96+
```
97+
98+
This automatically enables split static deployment for optimal build performance.
99+
45100
### Defining custom steps
46101

47102
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
83138
```php
84139
$configuration->addSharedFolder('var/reports');
85140
```
141+
142+
### OPcache Clearing
143+
144+
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.
145+
146+
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`:
147+
148+
```php
149+
<?php
150+
151+
namespace Hypernode\DeployConfiguration;
152+
153+
use function Deployer\after;
154+
155+
$configuration = new ApplicationTemplate\Magento2(['en_US']);
156+
157+
// Enable automatic OPcache clearing after deployment
158+
after('deploy:symlink', 'cachetool:clear:opcache');
159+
160+
return $configuration;
161+
```
162+
163+
```{note}
164+
On Hypernode, OPcache is automatically managed via `validate_timestamps`. You typically don't need to enable manual clearing unless you experience caching issues after deployment.
165+
```

docs/hypernode-deploy/getting-started/configure-ci-cd.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,16 @@ We assume you have an `auth.json` file in either your project directory or your
9292

9393
Then go to your Github repository on Github.com and go to **Settings -> 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**.
9494

95+
````{note}
96+
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:
97+
98+
```bash
99+
base64 -w0 < auth.json
100+
```
101+
102+
This produces a single-line encoded string that's safer for environment variables.
103+
````
104+
95105
### Hypernode API authentication
96106

97107
***Optional step***

0 commit comments

Comments
 (0)