Self-hosted Live Updates with Github Actions and S3
Overview
Self-hosted Live Updates allows customers to build and host their web artifacts then deploy them as Live Updates to app users. To help ensure secure end-to-end delivery, code signing and signature verification steps are included as well.
This example walks through setting up Self-hosted live updates in a Capacitor app using Github Actions and Amazon S3.
Requirements
For this example, we've already followed the Self-hosted live update App Setup instructions. This includes creating an Appflow app, a personal access token (PAT), a public/private key, and configuring the Capacitor app.
Github Actions Setup
With your Capacitor app configured to use self-hosted live updates, we can configure Github Actions next.
Store the Private Key Securely
To store the private key securely in Github, you can upload it as a repository secret, found under your repository settings -> Security -> Secrets and variables -> Actions -> Repository secrets. You can save this secret as PRIVATE_KEY
(or something similar). Doing so will make it available to the pipeline we'll write shortly.
Store a Personal Access Token Securely
The personal access token is used to authenticate access to your Appflow account via the Appflow CLI, so it also needs to be made available to the pipeline. Under "Repository secrets", create a new secret named IONIC_TOKEN
(or something similar) and paste your Personal Access Token.