Deploy your project

This is for:

Developer

The Coveo CLI leverages the Hosted Page API to bundle and upload Atomic projects to the Coveo infrastructure. It can then be consumed from anywhere on the web using the atomic-hosted-page web component.

Important

Before v2.3.0, the Coveo CLI used the 3rd-party Netlify tool for deployment.

Regardless of how you generated your Atomic search page, the root of the project will include a coveo.deploy.json file which defines the content to upload. This file is required for deployment.

It will also include a deployment.esbuild.mjs file, which takes your Stencil Custom Elements build and bundles it using esbuild. This bundle will match the accompanying JSON configuration.

Upload a new hosted page

If you created your search page using the Coveo CLI, you’ll deploy it to the Coveo infrastructure as a new hosted page.

  1. Run coveo auth:login to connect to your organization.

    Tip

    By default, this command connects to whichever organization you’re currently logged in with. If you belong to multiple organizations, you can append the -o=<ORG_ID> flag to connect to a specific one.

  2. Run npm run deploy.

    This will upload your bundled application as a new hosted page.

Update an existing hosted page

If you created your search page in the Coveo Administration Console and downloaded it using the Coveo CLI, or if you have already uploaded it, you’ll deploy it to the Coveo infrastructure as an update to an existing hosted page.

  1. On the Search Pages (platform-ca | platform-eu | platform-au) page of the Coveo Administration Console, get the ID of the hosted page that you want to update.

  2. Run coveo auth:login to connect to your organization.

    Tip

    By default, this command connects to whichever organization you’re currently logged in with. If you belong to multiple organizations, you can append the -o=<ORG_ID> flag to connect to a specific one.

  3. Run coveo ui:deploy -p <HOSTED_PAGE_ID>.

    This will update the target page with your bundled application.

Deploy your own project

You can use the coveo ui:deploy command to deploy any project that meets the following requirements:

  • It has a deployment configuration file.

  • It bundles all JavaScript files into one or more entry files, or provides URLs for external JavaScript files. Dynamic imports aren’t supported.

  • It bundles all CSS files into one or more entry files, or provides URLs for external CSS files. Dynamic imports aren’t supported.

  • It contains a single piece of HTML content.

Manage your deployments

The Custom Deployment tab on the Search Pages (platform-ca | platform-eu | platform-au) page of the Administration Console lets you view and manage your deployments. You can use it to do the following:

  • Get Coveo CLI commands to deploy a new page or update an existing one.

  • Get the ID of a hosted page.

  • View a live version of a hosted page.

  • Delete a hosted page.

What’s next?

You can use the atomic-hosted-page web component to consume a hosted page which is listed in the Custom Deployment tab from anywhere on the web.