Skip to content

GitHub Actions

Publish Live Updates from GitHub Actions. You can use the official Capawesome Cloud Live Update Action (recommended) or the Capawesome CLI directly.

Prerequisites

Create an API token in Capawesome Cloud and store it as a repository secret named CAPAWESOME_TOKEN. See Creating encrypted secrets for a repository.

Workflow

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

The official cloud-live-update-action wraps the upload in a single step — and creates the channel automatically if it doesn't exist yet:

.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, rolloutPercentage for gradual rollouts, and native version constraints to keep updates version-compatible. See the action README for the full list.

Prefer full control, or running on a non-GitHub CI? Use the Capawesome CLI directly:

.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.