You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
36
36
37
37
### Static Content Locales
38
38
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:
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)
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
+
45
100
### Defining custom steps
46
101
47
102
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
83
138
```php
84
139
$configuration->addSharedFolder('var/reports');
85
140
```
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
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.
Copy file name to clipboardExpand all lines: docs/hypernode-deploy/getting-started/configure-ci-cd.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,6 +92,16 @@ We assume you have an `auth.json` file in either your project directory or your
92
92
93
93
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**.
94
94
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.
0 commit comments