> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://contentful.com/developers/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://contentful.com/developers/docs/_mcp/server.

# Deploy a custom app

> An introduction to deploying apps for Contentful.

## Deploy app to your organization in Contentful

To deploy your app and make it available to the users in your Contentful organization, you must create a production build of your app and host it with [Contentful app hosting](/extensibility/app-framework/hosting-an-app).

The production build can be created with a build script provided by `create-contentful-app` tool.

To deploy your custom app:

1. Create a production build by running the following command:

```bash
npm run build
```

2. Upload your app to your organization by running the following command:

```bash
npm run upload
```

3. Follow the prompts by Contentful CLI to generate and copy an access token, select the required organization and app.

> **Info**
>
> Alternatively, you can provide this information through environment variables (`CONTENTFUL_ACCESS_TOKEN`, `CONTENTFUL_ORG_ID`, `CONTENTFUL_APP_DEF_ID`). To learn more, check [Contentful app-scripts reference](https://github.com/contentful/create-contentful-app/tree/master/packages/contentful--app-scripts#upload-a-bundle-to-an-app-definition).

## Automate deployment with GitHub Action

`@contentful/actions-app-deploy` is a custom GitHub Action to deploy a static Contentful app to Contentful App Hosting via GitHub Actions.

### Usage

After building your app, add the following step to your existing GitHub Actions job:

```
- uses: contentful/actions-app-deploy@v1
  with:
    organization-id: $&#123;&#123; secrets.ORGANIZATION_ID &#125;&#125;
    app-definition-id: $&#123;&#123; secrets.APP_DEFINITION_ID &#125;&#125;
    access-token: $&#123;&#123; secrets.ACCESS_TOKEN &#125;&#125;
    folder: build
```

When the job is run, the files are automatically uploaded as an AppBundle and promoted to the active bundle of the app definition. The new app is immediately served to all users.

### Read more about deploying with GitHub Action

* [GitHub Action repository](https://github.com/contentful/actions-app-deploy)
* [GitHub Action Documentation](/extensibility/app-framework#github-action)