Skip to content

Adobe Commerce Cloud Deployment

Tailwind Stylesheet Generation

For Hyvä projects on Magento Cloud, if the production stylesheet is not kept in version control, there are a few additional steps required to generate it during deployment.

Add the following code to the file:


    # build hooks run before the application has been packaged
    build: |

        # install nvm and node
        unset NPM_CONFIG_PREFIX
        curl -o- | bash
        export NVM_DIR="$HOME/.nvm"    
        [ -s "$NVM_DIR/"  ] &&. "$NVM_DIR/"
        nvm install 14

        # create required directory
        mkdir -p app/design/frontend/{VENDOR}/{THEME}/web/css/

        # install Tailwind dependencies
        npm --prefix app/design/frontend/{VENDOR}/{THEME}/web/tailwind/ install

        # build Tailwind production stylesheet
        npm --prefix app/design/frontend/{VENDOR}/{THEME}/web/tailwind/ run build-prod

        # cleanup
        rm -rf app/design/frontend/{VENDOR}/{THEME}/web/tailwind/node_modules/
        rm -rf ~/.nvm/


Composer Authorization

One possible approach is to commit the auth.json file to git and add a repository entry in composer.json for the Hyvä packagist:

"repositories": {
    "hyva-private-packagist": {
        "type": "composer",
        "url": "{{MERCHANT-ID}}/",
        "only": [

Setting the COMPOSER_AUTH variable on the PROJECT level (not on the ENVIRONMENT level) is also an option if the auth.json should not be committed to the repository.