> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/stormkit-io/stormkit-io/llms.txt
> Use this file to discover all available pages before exploring further.

# Deployments Overview

> Deploy your applications using Stormkit with Git integration, automatic deployments, and serverless functions.

## What is a Deployment?

Stormkit builds and deploys your application using AWS infrastructure. Static assets are hosted on S3 buckets and served through a CDN, while server-side logic runs on AWS Lambda functions.

Each deployment creates an immutable snapshot of your application that can be previewed, tested, and published to production.

## Deployment Methods

There are three ways to trigger a deployment:

<Steps>
  <Step title="Git Push">
    Enable auto deployments in your environment settings. Stormkit will automatically build and deploy when you push commits to configured branches.

    ```bash theme={null}
    git push origin main
    ```

    Stormkit receives the push event, builds your application, and creates a preview deployment with a unique URL.
  </Step>

  <Step title="UI Deployment">
    Manually trigger deployments from the Stormkit dashboard:

    1. Visit your application
    2. Click the **Deploy Now** button
    3. Select your environment
    4. Optionally override configuration for this deployment
  </Step>

  <Step title="Deploy Trigger API">
    Generate a deployment trigger URL for CI/CD integration:

    1. Go to **App** > **Settings**
    2. Find the **Trigger Deploy** section
    3. Click **Generate**

    Use the generated URL with `GET` or `POST` requests:

    ```bash theme={null}
    curl -XPOST https://api.stormkit.io/hooks/app/:app-id/deploy/:token/:environment-id \
      -H 'Content-Type: application/json' \
      -d '{"publish": true, "branch": "main"}'
    ```
  </Step>
</Steps>

<Warning>
  Keep your deployment trigger URL secure. Do not commit it to version control or share it publicly.
</Warning>

## Deployment Infrastructure

Stormkit uses AWS services for hosting:

* **S3 Buckets** - Static asset storage
* **CloudFront CDN** - Global content delivery
* **AWS Lambda** - Serverless function execution
* **Load Balancer** - Traffic routing and SSL termination

## Deployment Types

### Static Deployments

Pure static sites with no server-side rendering. All files are uploaded to S3 and served via CDN.

### Server-Side Rendering (SSR)

Applications with dynamic server logic run on AWS Lambda functions, with static assets still served from the CDN.

### Hybrid Deployments

Combination of static pages, API functions, and server-rendered pages in a single deployment.

## Deployment Lifecycle

<Steps>
  <Step title="Trigger">
    Deployment is triggered via Git push, UI, or API.
  </Step>

  <Step title="Queue">
    Deployment enters the build queue and waits for available runner.
  </Step>

  <Step title="Build">
    Runner clones repository, installs dependencies, and executes build commands.
  </Step>

  <Step title="Upload">
    Built artifacts are packaged and uploaded to S3.
  </Step>

  <Step title="Preview">
    Deployment becomes available at a unique preview URL.
  </Step>

  <Step title="Status Checks">
    Optional automated tests run to verify deployment quality.
  </Step>

  <Step title="Publish">
    Deployment is promoted to production environment (manual or automatic).
  </Step>
</Steps>

## Preview URLs

Every deployment gets a unique preview URL:

```
https://my-app--591950.stormkit.dev
```

The URL format is: `{app-name}--{deployment-id}.stormkit.dev`

Preview URLs are permanent and immutable, allowing you to test any deployment at any time.

## Environment URLs

Published deployments are available at environment-specific URLs:

```
https://my-app--production.stormkit.dev
https://my-app--staging.stormkit.dev
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Configuration" icon="gear" href="/deployments/configuration">
    Configure build settings, environment variables, and deployment options
  </Card>

  <Card title="Auto Deployments" icon="rotate" href="/deployments/auto-deployments">
    Set up automatic deployments on Git push
  </Card>

  <Card title="How We Deploy" icon="diagram-project" href="/deployments/how-we-deploy">
    Understand the deployment process and folder structure
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/deployments/troubleshooting">
    Solve common deployment issues
  </Card>
</CardGroup>
