Skip to main content

Deploy a Live Update on Appflow using the Ionic Cloud CLI

note

This feature is only available on our Standard or Enterprise plans. Please contact us to enable this feature.

Authentication#

The Ionic Cloud CLI has to be authenticated on Appflow to be able to deploy a Live Update.

To log in, create a Personal Access Token on the Appflow Dashboard.

then type:

$ export IONIC_TOKEN=<your personal access token>

Build a Live Update#

Assuming the CLI is authenticated, to deploy a Live Update, run:

$ ionic-cloud build web --app-id=<APPFLOW APP ID> --commit=<GIT COMMIT SHA>

Once the build is successfully triggered, the CLI will automatically start tailing the logs from Appflow. If you do not wish to wait for the build to complete, add the following flag --detached to your command. Please note: this will skip downloading any artifacts.

Customize the Live Update build#

The Options available to customize the build include:

  • --env=<name> Specify ad-hoc environment variables. You can use the flag any number of times to specify as many environment variables.
  • --env-file=<name> You can specify a file with any number of environment variables (one on each line).
  • --environment=<name> to specify the group of environment variables to be exposed to the build (available only with Automation; more info about environments are available here)

Deploy a Live Update#

$ ionic-cloud deploy web --app-id=<APPFLOW APP ID> --build-id=<BUILD ID FROM PREVIOUS COMMAND>

Customize the Live Update deploy#

The Advanced Options available to customize the build include:

  • --destination=<name> to specify the channel you want to auto deploy the build to. This can be repeated multiple times if multiple channels need to be specified; more infos about channels are available here

Note about referencing Options values by name#

Names are case-sensitive and need to be specified including spaces, for instance:

$ ionic-cloud deploy web --app-id=123 --build-id=456 --destination="My Custom Channel"

Apart from the --commit option, all others require the full name setup within the Appflow Dashboard.

Look for the name on the Environments and Destinations pages in Appflow:

CLI Environments List CLI Channels List

Contact Us#