This feature is only available on our Standard or Enterprise plans. Please contact us to enable this feature.
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.
$ export IONIC_TOKEN=<your personal access token>
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.
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)
$ ionic-cloud deploy web --app-id=<APPFLOW APP ID> --build-id=<BUILD ID FROM PREVIOUS COMMAND>
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
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: