A manual deployment is a failure of process. To achieve true engineering velocity, your mobile OTA updates should be as automated as your web deployments. This guide explains how to build a production-hardened CI/CD pipeline using GitHub Actions and AppSpacer.
The Automated Release Pipeline
Every commit to main should trigger a staging update, and every tagged release should go to production. By using the AppSpacer CLI, you can orchestrate this workflow with zero manual intervention.
name: Deploy OTA
on:
push:
branches: [main]
tags: ['v*']
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
- name: Install Spacer
run: npm install -g @appspacer/cli
- name: Deploy Staging
if: github.ref == 'refs/heads/main'
run: spacer push --env staging --key ${{ secrets.SPACER_STAGING_KEY }}
- name: Deploy Production
if: startsWith(github.ref, 'refs/tags/v')
run: spacer push --env prod --key ${{ secrets.SPACER_PROD_KEY }}
Branch-Based Environments
AppSpacer supports infinite preview environments. You can configure your CI to push "Feature Branch" updates to a specific environment, allowing your QA team to test new features by simply switching an "Environment" toggle within a hidden developer menu in the app.
Automatic Rollbacks & Health Checks
The most advanced CI/CD setups include a Post-Deploy Health Check. If your monitoring suite (Sentry/NewRelic) detects a spike in errors within 10 minutes of an OTA push, you can trigger a GitHub Action to run spacer rollback, instantly reverting all users to the last stable state.
By automating your OTA updates, you move from "Releasing" to "Delivering"—reducing the time from 'Code Complete' to 'In User Hands' from days to seconds.