---
title: Publish Live Updates with GitHub Actions
description: Publish Capawesome Cloud Live Updates from GitHub Actions — using the official cloud-live-update-action or the Capawesome CLI.
---

# GitHub Actions

Publish Live Updates from [GitHub Actions](https://github.com/features/actions){:target="_blank"}. You can use the official **Capawesome Cloud Live Update Action** (recommended) or the [Capawesome CLI](../../cli/index.md) directly.

## Prerequisites

Create an [API token](../../accounts/tokens.md) in Capawesome Cloud and store it as a repository secret named `CAPAWESOME_TOKEN`. See [Creating encrypted secrets for a repository](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#creating-encrypted-secrets-for-a-repository){:target="_blank"}.

## Workflow

Build your web assets, then publish them as a Live Update bundle.

=== "GitHub Action"

    The official [`cloud-live-update-action`](https://github.com/capawesome-team/cloud-live-update-action){:target="_blank"} wraps the upload in a single step — and creates the channel automatically if it doesn't exist yet:

    ```yaml title=".github/workflows/deploy-live-update.yml"
    name: Deploy Live Update
    on:
      push:
        branches: [main]
    jobs:
      deploy:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v4
          - uses: actions/setup-node@v4
            with:
              node-version: 20
          - run: npm ci
          - run: npm run build
          - uses: capawesome-team/cloud-live-update-action@v0.1.0
            with:
              appId: "00000000-0000-0000-0000-000000000000"
              channel: production
              path: dist
              gitRef: ${{ github.sha }}
              token: ${{ secrets.CAPAWESOME_TOKEN }}
    ```

    The action exposes all the upload options as inputs — including `privateKey` for [code signing](../code-signing.md), `rolloutPercentage` for [gradual rollouts](../rollouts.md), and native version constraints to keep updates [version-compatible](../binary-compatible-changes.md). See the [action README](https://github.com/capawesome-team/cloud-live-update-action){:target="_blank"} for the full list.

=== "CLI"

    Prefer full control, or running on a non-GitHub CI? Use the [Capawesome CLI](../../cli/index.md) directly:

    ```yaml title=".github/workflows/deploy-live-update.yml"
    name: Deploy Live Update
    on:
      push:
        branches: [main]
    jobs:
      deploy:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v4
          - uses: actions/setup-node@v4
            with:
              node-version: 20
          - run: npm ci
          - run: npm run build
          - run: npx @capawesome/cli login --token ${{ secrets.CAPAWESOME_TOKEN }}
          - run: npx @capawesome/cli apps:channels:create --app-id 00000000-0000-0000-0000-000000000000 --name production --ignore-errors
          - run: npx @capawesome/cli apps:liveupdates:upload --app-id 00000000-0000-0000-0000-000000000000 --path dist --channel production
    ```

Pin the action (or the CLI version) to a specific release for reproducible runs. Trigger on `push` for automatic releases, or use `workflow_dispatch` to publish on demand.
