Widgetbook Hosting

Widgetbook Hosting enables users to upload the Flutter web version of a Widgetbook to Widgetbook Cloud. To upload any Widgetbook, you need an API key.

How to Create an API Key

  1. Log in to Widgetbook Cloud with your account.
  2. API keys are tied to projects, so you need a project to obtain an API key.
  3. Only users with the Owner role can fetch a project's API key to protect sensitive information.
  4. If you are not a project owner but need the API key, ask your project owner to promote you from member to owner. For more information on member management, see Member Management.
  5. To create a new project, create a billing account first.
  6. On the project's detail page, a card with a button to fetch the API key is displayed. Click the button to copy the API key to your clipboard.

Hosting with CI/CD Vendors

To upload a Widgetbook Build and create Reviews in your CI/CD pipeline, follow these steps:

  1. Install the Flutter SDK.
  2. Run the build_runner package: flutter pub run build_runner build --delete-conflicting-outputs.
  3. Build your Widgetbook: flutter build web -t path/to/widgetbook/main/file.
  4. Activate the Widgetbook CLI: dart pub global activate widgetbook_cli.
  5. Run the CLI as described in the documentation.

Examples

CI/CD VendorLink
GitHub🔗
Codemagic🔗
Azure🔗
GitLab🔗

Is your CI/CD vendor missing? Let us know via Discord, and we'll be happy to help.

Are you using BitBucket? You can read more here

Environment Variables

The Docker image reads Git-specific information, like branch name and repository name, from environment variables. It also requires two mandatory user-provided environment variables. In BitBucket, add repository variables by navigating to the repository settings and selecting repository variables.

Environment VariableDescriptionIs Required
WIDGETBOOK_BUILD_PATHThe path to the web build of the Widgetbook. For small repositories, this is likely build/web/.
WIDGETBOOK_API_KEYThe API key for your company. See How to Create an API Key