Upload builds

A build can be uploaded to Widgetbook Cloud using the Widgetbook CLI. We recommend to setup a CI/CD workflow to automatically upload builds for each commit and branch.

Tutorial video

Upload build using CI/CD

To follow the CI/CD setup guide select your Git provider below

GitHub
GitHub

Upload builds with GitHub action.

GitLab
GitLab

Upload builds with GitLab pipelines.

Azure DevOps
Azure DevOps

Upload builds with Azure Pipelines.

Bitbucket
Bitbucket

Upload builds with Bitbucket Pipelines.

Upload build manually

To create a Widgetbook Build, follow these steps inside your Widgetbook project:

Run widgetbook_generator to generate metadata about your use-cases and components

bash
dart run build_runner build -d

Build the Widgetbook for the web

bash
# Default target (i.e. `lib/main.dart`)
flutter build web

# Custom target
flutter build web -t lib/main.widgetbook.dart

Install the Widgetbook CLI

bash
dart pub global activate widgetbook_cli
  1. Get your API key from the Widgetbook Cloud's project settings page.

Push the build to Widgetbook Cloud

bash
widgetbook cloud build push --api-key PROJECT_API_KEY