Skip to main content

Deploying Storybooks

You can share a live storybook preview with your team by deploying it to a dedicated Roblox experience. Each story you write is immediately playable from any browser via the experience's direct link, no Studio required.

Two tools handle this:

  • flipbook-cli: a standalone CLI you can run locally or from any CI environment
  • deploy-storybook: a GitHub Action that wraps the CLI for automated deployments

Setup​

Create the Preview Experience​

  1. Go to Creator Hub and create a new experience.
  2. Note the UniverseId and PlaceId. You'll need these later.
  3. Enable Allow Copying on the start place if the deployment should create per-PR places by cloning it.
  4. Close the experience in Studio after publishing to avoid conflicts during deploys.
  5. Open the start place settings and enable Direct Access Control > Fully Open. This is what makes stable, shareable deep-links to each story work.

Create an Open Cloud API Key​

  1. Go to Creator Hub > Credentials.
  2. Click Create API Key and scope it to your storybook experience.
  3. Grant it universe-places:write, universe.place.luau-execution-session:read, and universe.place.luau-execution-session:write access for the Storybook experience.
  4. Copy the generated key.

Add Secrets to Your Repository​

In Settings > Environments (or Secrets and variables > Actions):

NameTypeValue
ROBLOX_API_KEYSecretThe Open Cloud API key
ROBLOX_STORYBOOK_UNIVERSE_IDVariableThe UniverseId from step 1

Using the GitHub Action​

Add the deploy-storybook Action to your workflow. Build your storybook .rbxl beforehand (e.g. with Rojo), then pass it as place-file. The examples below install Rojo with Rokit, so they expect Rojo to be pinned in your repository's rokit.toml.

Deploy on Every Push to Main​

name: Deploy storybook
on:
push:
branches: [main]

jobs:
deploy:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v6

- uses: CompeyDev/setup-rokit@v0.1.2

- name: Build storybook
run: rojo build storybook.project.json -o storybook.rbxl

- uses: flipbook-labs/deploy-storybook@v1
with:
api-key: ${{ secrets.ROBLOX_API_KEY }}
universe-id: ${{ vars.ROBLOX_STORYBOOK_UNIVERSE_ID }}
place-name: Flipbook Stories
place-file: storybook.rbxl

Per-PR Preview Deploys​

Each pull request gets its own named place and a comment with the preview link:

name: Deploy storybook
on:
pull_request:

permissions:
contents: read
pull-requests: write

jobs:
deploy:
runs-on: ubuntu-latest
environment: storybook-preview
steps:
- uses: actions/checkout@v6

- uses: CompeyDev/setup-rokit@v0.1.2

- name: Build storybook
run: rojo build storybook.project.json -o storybook.rbxl

- uses: flipbook-labs/deploy-storybook@v1
with:
api-key: ${{ secrets.ROBLOX_API_KEY }}
universe-id: ${{ vars.ROBLOX_STORYBOOK_UNIVERSE_ID }}
place-name: "PR ${{ github.event.pull_request.number }}"
place-file: storybook.rbxl

The Action resolves the place by name and creates it if it doesn't exist yet. Pass an explicit place-id if you have multiple places with the same name.

For a focused review link, run flipbook-cli comment directly and pass a JSON object through --launch-data:

flipbook-cli comment \
--pr 123 \
--universe-id 123 \
--place-name "PR 123" \
--launch-data '{"search":"Button|Dialog","story":"Examples/Button"}'

The resulting launch link prepopulates embedded Flipbook's search and can open one Story by its sidebar-relative path. See Opening a Focused Preview Link for the supported fields.

Action Inputs​

InputRequiredDescriptionDefault
api-keyyesRoblox Open Cloud API key
universe-idyesUniverse (experience) ID to deploy to
place-nameyesName of the place to update or create
place-fileyesPath to the built .rbxl place file
place-idnoExplicit place ID; disambiguates same-named places
flipbook-rbxmnoPath to a local Flipbook.rbxm; skips downloading from GitHub
cli-versionnoflipbook-cli version to install, without a leading v0.6.0
rokit-versionnoRokit version used to install the CLIv1.2.0
github-tokennoToken for release downloads and preview commentsworkflow token
commentnoPost a preview comment on the PR after deploy'true'

Using Flipbook-cli Directly​

Install via Rokit:

rokit add flipbook-labs/flipbook-cli

Deploy a storybook place:

flipbook-cli deploy \
--universe-id 123 \
--place-name "Flipbook Stories" \
--place-file out.rbxl

Pass --api-key or set the ROBLOX_API_KEY environment variable.

The deploy command:

  1. Resolves --place-name to a place in the universe (or creates one via CreatePlaceAsync from the start place).
  2. Publishes --place-file to that place.
  3. Injects the latest Flipbook runtime into ReplicatedStorage.Flipbook.
note

Embedding Flipbook: the one-click version for the place you have open Getting Started: Writing your first story Ecosystem: Overview of all flipbook-labs repos