CI/CD Integration
Automate frame deploys in your CI pipeline using token authentication and non-interactive flags.
In CI environments you cannot use interactive prompts. Use a service account token for auth, pass org and project IDs directly, and add --force to skip any confirmation prompts.
Full pipeline
nativeblocks auth token "$NB_TOKEN"
nativeblocks organization set --id $NB_ORG_ID
nativeblocks project set --id $NB_PROJECT_ID
nativeblocks frame deploy -f src/home.ts --tag $VERSION --force
auth tokentakes the JWT as a positional argument--idbypasses interactive org/project selection--forceskips tag confirmation and ownership transfer prompts
Store NB_TOKEN, NB_ORG_ID, and NB_PROJECT_ID as secrets in your CI provider. Never hardcode them.
GitHub Actions example
name: Deploy frames
on:
push:
tags:
- "v*"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nativeblocks CLI
run: curl -fsSL https://nativeblocks.io/download/cli/installer.sh | bash
- name: Deploy frames
env:
NB_TOKEN: ${{ secrets.NB_TOKEN }}
NB_ORG_ID: ${{ secrets.NB_ORG_ID }}
NB_PROJECT_ID: ${{ secrets.NB_PROJECT_ID }}
run: |
nativeblocks auth token "$NB_TOKEN"
nativeblocks organization set --id $NB_ORG_ID
nativeblocks project set --id $NB_PROJECT_ID
nativeblocks frame deploy -f src/home.ts --tag ${{ github.ref_name }} --force
nativeblocks frame deploy -f src/profile.ts --tag ${{ github.ref_name }} --force
nativeblocks frame deploy -f src/checkout.ts --tag ${{ github.ref_name }} --force
Notes
- Frames deployed in CI are not yet active. Go to the Dashboard to activate a tag, set a rollout percentage, or roll back.
- Each
frame deploy --tagcall is independent. If one fails, the others are not affected. - Set
$VERSIONfrom your pipeline's git tag, build number, or commit SHA.