
Keeping your React Native apps updated in production is crucial.
With AppsOnAir CodePush and GitHub Actions, you can automate your deployment pipeline so that every push to main
can trigger an OTA (Over-The-Air) update for your Android and iOS apps.
In this guide, we’ll walk through setting up GitHub CI/CD to automate CodePush deployments using @appsonair/codepush-cli.
Prerequisites
Before diving in, ensure you have the following:
- A React Native project integrated with AppsOnAir CodePush.
- CodePush is set up for both Android and iOS apps via the AppsOnAir dashboard.
How to Generate Your AppsOnAir Access Key?
To deploy with AppsOnAir CodePush, you'll need an access token. Here's how to generate one for the first time:
Step 1: Install the CodePush CLI
Make sure you have Node.js installed, then run:
npm install -g @appsonair/codepush-cli
This installs the AppsOnAir CLI globally.
Step 2: Generate the Access Key
Run the login command:
appsonair-codepush login

This will:
- Open your default browser.
- Redirect you to a page where you can generate a new access key.
- Login into the CLI using the access key.
Note: The generated access key is valid for 60 days, after which you'll need to regenerate and update it in your GitHub repository secrets.
Step 3: Save the Token Securely
Once generated:
- Copy the token from the above step.
- Go to your GitHub repo → Settings → Secrets and variables → Actions → Repository Secrets.
- Add it as
CODEPUSH_TOKEN
.
Get Your App Names for CodePush
To deploy to the correct apps on AppsOnAir, you’ll need to know your exact App Name (not your project folder name).
You can fetch your available apps using the CLI:
appsonair-codepush app ls
This command lists all the apps linked to your AppsOnAir account, along with their platforms.

Take the values under the Name column and add them to your GitHub secrets as:
These names must exactly match what’s shown in the CLI output, otherwise the deployment will fail.

Create Your codepush.yaml Workflow
Inside your repo, create the following file:
.github/workflows/codepush.yaml
name: CodePush Deploy
on:
push:
branches:
- main
jobs:
codepush:
runs-on: ubuntu-latest
env:
CODEPUSH_TOKEN: ${{ secrets.CODEPUSH_TOKEN }}
APP_NAME_ANDROID: ${{ secrets.APP_NAME_ANDROID }}
APP_NAME_IOS: ${{ secrets.APP_NAME_IOS }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '18' # Use your required Node.js version
- name: Install CodePush CLI tools
run: |
npm i -g @appsonair/codepush-cli
- name: CodePush authentication
run: |
appsonair-codepush login --accessKey $CODEPUSH_TOKEN
- name: Install project dependencies
run: npm install
- name: CodePush deployment - iOS
run: |
appsonair-codepush release-react $APP_NAME_IOS
- name: CodePush deployment - Android
run: |
appsonair-codepush release-react $APP_NAME_ANDROID
What Happens Here?
- Trigger: On every push to the
main
branch. - Setup: Installs Node.js and AppsOnAir CodePush CLI.
- Auth: Logs in using your AppsOnAir access token.
- Deploy: Runs
release-react
for iOS and Android using secrets.
Final Result
Once this is set up:
- Push code changes to your main branch.
- GitHub Action triggers and authenticates with AppsOnAir.
- Your React Native bundle is CodePushed to production.
- Users receive the update instantly, no app store deployment needed.