Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add Capawesome Cloud integration #2503

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions content/integrations/capawesome-cloud-integration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
title: Capawesome Cloud integration
description: How to integrate your workflows with Capawesome Cloud using codemagic.yaml
weight: 7
---

[Capawesome Cloud](https://capawesome.io/cloud/) is a powerful platform that provides a suite of tools to help you deploy [Live Updates](https://capawesome.io/blog/announcing-the-capacitor-live-update-plugin/) to your [Capacitor](https://capacitorjs.com/) apps after they have been published to the App Store or Google Play.

## Configure access to Capawesome Cloud

Follow these steps to configure access to Capawesome Cloud:

1. Sign up with [Capawesome Cloud](https://cloud.capawesome.io) and generate a new token via the [Settings](https://cloud.capawesome.io/settings/tokens) page
2. Open your Codemagic app settings, and go to the **Environment variables** tab.
3. Enter the desired **_Variable name_**, e.g. `CAPAWESOME_TOKEN`.
4. Copy and paste the Capawesome Cloud token string as **_Variable value_**.
5. Enter the variable group name, e.g. **_capawesome_credentials_**. Click the button to create the group.
6. Make sure the **Secure** option is selected.
7. Click the **Add** button to add the variable.
8. Add the variable group to your `codemagic.yaml` file

{{< highlight yaml "style=paraiso-dark">}}
environment:
groups:
- capawesome_credentials
{{< /highlight >}}

## Install the Capawesome Cloud CLI

In order to deploy live updates to Capawesome Cloud, you need to install the Capawesome Cloud CLI:

{{< highlight yaml "style=paraiso-dark">}}
scripts:
- name: Install Capawesome Cloud CLI
script: |
npm install @capawesome/cli
{{< /highlight >}}

After that, you need to log in to Capawesome Cloud using the token you generated:

{{< highlight yaml "style=paraiso-dark">}}
scripts:
- name: Log in to Capawesome Cloud
script: |
npx capawesome login --token $CAPAWESOME_TOKEN
{{< /highlight >}}

## Deploy a Live Update to Capawesome Cloud

Now you can deploy a live update to Capawesome Cloud:

{{< highlight yaml "style=paraiso-dark">}}
scripts:
- name: Deploy to Capawesome Cloud
script: |
npx capawesome apps:bundles:create --appId <app-id> --path <path-to-bundle>
{{< /highlight >}}

Make sure to replace `<app-id>` with the ID of your app on Capawesome Cloud and `<path-to-bundle>` with the path to the bundle you want to upload (e.g. `www`).
Copy link
Collaborator

@icarusdust icarusdust Nov 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the PR

perhaps better show the actual bundle path where e.g. ios binary is located: build/ios/ipa/App.ipa

Copy link
Collaborator

@icarusdust icarusdust Nov 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or remove the e.g. 'www' part because as i understand you need to upload ios and android binaries here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for getting back! No, you do not need to upload the Android and iOS binaries. It's not possible to update the native version of an app via live updates. You can only update the web assets of an app. For this reason, --path actually refers to the path of the web build (e.g. www or dist).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for clarifying it.

Copy link
Collaborator

@icarusdust icarusdust Nov 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a note in the sample project, after making those changes, it looks good to be merged.


We recommend that you also specify a [Channel](https://capawesome.io/cloud/live-updates/channels/) when uploading the bundle:

{{< highlight yaml "style=paraiso-dark">}}
scripts:
- name: Deploy to Capawesome Cloud
script: |
npx capawesome apps:bundles:create --appId <app-id> --path <path-to-bundle> --channel <channel-name>
{{< /highlight >}}

This way you can easily restrict live updates to specific versions of your app and prevent incompatible updates.

The Capawesome Cloud CLI then automatically creates a zip archive of the bundle and uploads it to the Capawesome Cloud where it becomes immediately available for download.
1 change: 1 addition & 0 deletions content/yaml-quick-start/codemagic-sample-projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ For further information on how to configure the **codemagic.yaml** for your proj
* [Appetize](https://github.com/codemagic-ci-cd/codemagic-sample-projects/tree/main/integrations/appetize_integration_demo_project)
* [BrowserStack App Automate](https://github.com/codemagic-ci-cd/codemagic-sample-projects/tree/main/integrations/browserstack_app_automate_demo_project)
* [BrowserStack App Live](https://github.com/codemagic-ci-cd/codemagic-sample-projects/tree/main/integrations/browserstack_app_live_demo_project)
* [Capawesome Cloud](https://github.com/codemagic-ci-cd/codemagic-sample-projects/tree/main/integrations/capawesome_cloud_demo_project)
* [Capgo](https://github.com/codemagic-ci-cd/codemagic-sample-projects/tree/main/integrations/capgo_integration_demo_project)
* [Codecov](https://github.com/codemagic-ci-cd/codemagic-sample-projects/tree/main/integrations/codecov_integration_demo_project)
* [Discord](https://github.com/codemagic-ci-cd/codemagic-sample-projects/tree/main/integrations/discord_integration_demo_project)
Expand Down