
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:
This installs the AppsOnAir CLI globally.
Step 2: Generate the Access Key
Run the login command:

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:
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:
Secret Name
Value
APP_NAME_IOS
workspace-name-app-name-ios
APP_NAME_ANDROID
workspace-name-app-name-android
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:
What Happens Here?
Inside your repo, create the following file:
- 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.