> ## Documentation Index
> Fetch the complete documentation index at: https://docs.synapsebuilder.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Deployment

> Automated deployment with GitHub and Fly.io

## Deployment Pipeline

Synapse automates the entire deployment process from code generation to production.

## How It Works

<Steps>
  <Step title="GitHub Repository">
    Code is pushed to your personal GitHub repository with one repo per user
  </Step>

  <Step title="Fly.io Service">
    Fly.io automatically creates a containerized service for each generation
  </Step>

  <Step title="Shopify CLI">
    Extensions are deployed to Shopify using the official CLI
  </Step>

  <Step title="Auto-Release">
    Latest versions are automatically released to your dev store
  </Step>
</Steps>

## GitHub Integration

* **One Repo Per User**: Clean separation of user code
* **Branch Per Generation**: Each generation gets its own branch
* **GitHub Actions**: Automatic deployment on push
* **Fly.io Token**: Securely stored in GitHub secrets

## Fly.io Configuration

```json theme={null}
{
  "build": {
    "builder": "NIXPACKS"
  },
  "deploy": {
    "numReplicas": 1,
    "restartPolicyType": "ON_FAILURE"
  }
}
```

## Environment Variables

Required environment variables for deployment:

* `SHOPIFY_CLIENT_ID`: Your Shopify app client ID
* `SHOPIFY_CLIENT_SECRET`: Your Shopify app secret
* `SHOPIFY_CLI_PARTNERS_TOKEN`: Partners API token
* `SHOPIFY_DEV_STORE_URL`: Your development store URL
* `FLY_API_TOKEN`: Fly.io project token

## Monitoring

View deployment logs and status:

* **Fly.io Dashboard**: Real-time logs and metrics
* **GitHub Actions**: Deployment workflow status
* **Shopify Partner**: Extension version history
