Now that you understand Experro’s base theme and its functioning, once you’ve made the necessary changes to align with your requirements, you might consider deploying it to the specific Experro workspace you’re working on. Deploying is as simple as running a couple of commands in your terminal.

Watch Out!

Before deploying the theme, ensure that your .env file contains valid information about your Experro workspace and a valid Experro CLI token with theme upload or full access permission.
Here’s the representation of how your .env file should be formatted:
CLI_TOKEN=<your-CLI-token>
STORE_URL=<store-hase>.experro.app
TENANT_ID=<tenant-id>
WORKSPACE_ID=<workspace-id>
API_HOST=apis.experro.app
CHANNEL_IDS=<channel_id's>
The second requirement is to have Expero CLI installed on your system.
After making changes and customizations, the theme developer simply needs to open the terminal and navigate to the theme’s directory.

Step 1: Get Environment List

First, retrieve the environment ID for the intended deployment by utilizing the following command:
experro-cli environment list
This command will provide an output similar to this: environment-list.png You will need to note down the ID of the environment you wish to deploy.

Step 2: Version Create and Theme Upload

To create a version and deploy the theme, use the following command:
experro-cli version create --name=<version_name> --environment-id=<environment_id>
If your CLI token has full access permission and you also want to publish the version, add the --publish-version option after the above version create command.
experro-cli version create --name=<version_name> --environment-id=<environment_id> --publish-version
And that’s all, just hit enter to run this command, and your theme deployment will begin.

When you have only Theme Upload Permission

If you have a CLI token with only upload permission, then you just need to use the first command mentioned in the previous Step 2. However, after a successful build upload, you will see an object printed in the terminal with Data and id keys. Make sure to note down the id value, as it represents the version id needed for publishing the build with that version. This id value will be essential for publishing the theme using the appropriate CLI token access through the command.
experro-cli version publish
For further details about CLI options, you can refer to the About CLI document.