---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../../modules.md) / [operations/mrt](../index.md) / pushBundle

# Function: pushBundle()

> **pushBundle**(`options`, `auth`): `Promise`\<[`PushResult`](../interfaces/PushResult.md)\>

Defined in: [packages/b2c-tooling-sdk/src/operations/mrt/push.ts:101](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/e7c16f1ae423da0aa47b3e10be88f9770b53619b/packages/b2c-tooling-sdk/src/operations/mrt/push.ts#L101)

Pushes a bundle to a Managed Runtime project.

This function creates a bundle from the build directory and uploads it
to the specified MRT project. Optionally, it can also deploy the bundle
to a target environment.

## Parameters

### options

[`PushOptions`](../interfaces/PushOptions.md)

Push configuration options

### auth

[`AuthStrategy`](../../../auth/interfaces/AuthStrategy.md)

Authentication strategy (ApiKeyStrategy)

## Returns

`Promise`\<[`PushResult`](../interfaces/PushResult.md)\>

Result of the push operation

## Throws

Error if push fails

## Example

```typescript
import { ApiKeyStrategy } from '@salesforce/b2c-tooling-sdk/auth';
import { pushBundle } from '@salesforce/b2c-tooling-sdk/operations/mrt';

const auth = new ApiKeyStrategy(process.env.MRT_API_KEY!, 'Authorization');

const result = await pushBundle({
  projectSlug: 'my-storefront',
  ssrOnly: ['ssr.js'],
  ssrShared: ['**/*.js', 'static/**/*'],
  buildDirectory: './build',
  message: 'Release v1.0.0',
  target: 'staging'  // Optional: deploy after push
}, auth);

console.log(`Bundle ${result.bundleId} pushed to ${result.projectSlug}`);
if (result.deployed) {
  console.log(`Deployed to ${result.target}`);
}
```
