Deploying
trustisto template deploy ./my-popuptemplate deploy validates the template, packs it into a zip and uploads it to the panel as a template of your organization. On the first deploy it asks for the template name (--name skips the question). The upload is processed in the background; the command waits until the panel has stored the template and prints its address:
Deploying template 4953 (18 kB)...
Deployed template 4953: https://.../index.htmlThe template then shows up among your organization’s templates in the panel, ready to be picked for a campaign.
What is uploaded
Everything in the folder except:
- files and folders whose name starts with a dot (
.git,.DS_Store,.trustisto), node_modules,package.jsonandpackage-lock.json.
Deploying again
The id of the deployed template is saved in a .trustisto file in the template folder. The next deploy from the same folder asks whether to overwrite that template, so a change replaces it instead of creating a copy:
trustisto template deploy ./my-popup --yes # overwrite without asking
trustisto template deploy ./my-popup --new # create another templateCampaigns that use the template pick up the new version: they point at the template, not at a copy. Commit .trustisto if everyone on the team should deploy to the same template, or keep it out of the repository if each person deploys their own.
If the template was deleted in the panel, deploy notices it and creates a new one.
Deploying from CI
With TRUSTISTO_EMAIL and TRUSTISTO_TOKEN set (see Logging in), pass everything the command would otherwise ask for:
npx @trustisto/cli template deploy ./my-popup --name "Spring sale" --yes --json--json prints the deployed template as JSON instead of text, for example to read its id and url in the next step of the pipeline.
Deleting
trustisto template delete ./my-popuptemplate delete removes the deployed template from the panel after asking (--yes skips the question) and forgets its id in .trustisto. The local folder stays as it is. Campaigns that still use the template stop finding it, so switch them to another template first.