-
Notifications
You must be signed in to change notification settings - Fork 120
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
robingenz
wants to merge
2
commits into
codemagic-ci-cd:master
Choose a base branch
from
robingenz:capawesome-cloud-integration
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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`). | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
ordist
).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for clarifying it.
There was a problem hiding this comment.
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.