Shipnative includes GitHub Actions workflows for continuous integration and deployment.
Included Workflows
| Workflow | File | Trigger | Purpose |
|---|
| CI | ci.yml | Push, PR | Lint, typecheck, test, build analysis |
| Deploy | deploy.yml | Push to main, Release | Production deployments |
| Preview | preview.yml | Pull Request | Preview deployments for PRs |
CI Workflow
Runs on every push and pull request to ensure code quality.
Jobs
- Lint - ESLint checks
- Typecheck - TypeScript compilation
- Test - Jest test suite
- Build Web App - Expo web build with bundle size analysis
- Bundle Analysis - Tree-shaking and dependency checks
- Build Marketing - Marketing site build
# Triggered automatically on:
on:
pull_request:
push:
branches: [main]
Deploy Workflow
Handles production deployments for web and mobile.
Triggers
- Push to main → Auto-deploy web + marketing
- GitHub Release → Build + submit mobile apps to stores
- Manual dispatch → Select what to deploy
Required Secrets
Add these in GitHub Settings → Secrets:
| Secret | Description |
|---|
EXPO_TOKEN | Expo access token from expo.dev |
VERCEL_TOKEN | Vercel deployment token |
VERCEL_ORG_ID | Vercel organization ID |
VERCEL_PROJECT_ID | Vercel project ID for web app |
VERCEL_MARKETING_PROJECT_ID | Vercel project ID for marketing site |
Environment Secrets
| Secret | Description |
|---|
EXPO_PUBLIC_SUPABASE_URL | Supabase project URL |
EXPO_PUBLIC_SUPABASE_PUBLISHABLE_KEY | Supabase anon key |
EXPO_PUBLIC_POSTHOG_KEY | PostHog API key |
EXPO_PUBLIC_SENTRY_DSN | Sentry DSN |
Manual Deployment
- Go to Actions → Deploy
- Click Run workflow
- Select what to deploy:
- Deploy web app
- Deploy marketing site
- Build & submit iOS
- Build & submit Android
- Choose EAS profile (production/preview)
Preview Workflow
Creates preview deployments for pull requests.
Features
- Web preview URL - Vercel preview deployment
- Mobile preview - EAS Update with QR code
- Marketing preview - Separate preview for marketing site
- Auto-comments - PR comments with preview URLs
How It Works
- Open a PR with changes to the app
- GitHub Actions builds a preview
- Bot comments on PR with preview URLs
- Scan QR code to test on mobile device
Testing Mobile Previews: Install a development build with the preview channel configured, then scan the QR code from the PR comment.
Setup Guide
1. Get Expo Token
# Login to Expo
npx expo login
# Get your token from expo.dev
# Settings → Access Tokens → Create
cd apps/app
eas build:configure
eas credentials # Set up iOS/Android certs
3. Set Up Vercel (Optional)
# Install Vercel CLI
npm i -g vercel
# Link project
cd apps/app
vercel link
# Get IDs from .vercel/project.json
cat .vercel/project.json
4. Add GitHub Secrets
Go to your repo → Settings → Secrets and variables → Actions → New repository secret
Add all required secrets listed above.
Customization
Changing Deploy Triggers
Edit .github/workflows/deploy.yml:
on:
push:
branches:
- main
- production # Add more branches
paths:
- "apps/app/**" # Only deploy when app changes
Adding Custom Jobs
jobs:
my-custom-job:
name: Custom Job
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run custom script
run: ./scripts/my-script.sh
Environment-Specific Deploys
jobs:
deploy-staging:
environment:
name: staging
url: https://staging.yourapp.com
# Uses secrets from staging environment
Troubleshooting
Build Failing
- Check that all secrets are set correctly
- Verify EAS is configured:
eas build:configure
- Check build logs in EAS dashboard
Preview Not Working
- Ensure
VERCEL_TOKEN is valid
- Check Vercel project is linked
- Verify paths-filter is detecting changes
Mobile Submit Failing
- Verify App Store / Play Store credentials in EAS
- Check app version is incremented
- Review EAS submit logs
Don’t commit secrets! Always use GitHub Secrets for sensitive values. Never put API keys in workflow files.