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
- Go to Creator Hub and create a new experience.
- Note the UniverseId and PlaceId. You'll need these later.
- Enable Allow Copying on the start place if the deployment should create per-PR places by cloning it.
- Close the experience in Studio after publishing to avoid conflicts during deploys.
- 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
- Go to Creator Hub > Credentials.
- Click Create API Key and scope it to your storybook experience.
- Grant it
universe-places:write,universe.place.luau-execution-session:read, anduniverse.place.luau-execution-session:writeaccess for the Storybook experience. - Copy the generated key.
Add Secrets to Your Repository
In Settings > Environments (or Secrets and variables > Actions):
| Name | Type | Value |
|---|---|---|
ROBLOX_API_KEY | Secret | The Open Cloud API key |
ROBLOX_STORYBOOK_UNIVERSE_ID | Variable | The 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
| Input | Required | Description | Default |
|---|---|---|---|
api-key | yes | Roblox Open Cloud API key | |
universe-id | yes | Universe (experience) ID to deploy to | |
place-name | yes | Name of the place to update or create | |
place-file | yes | Path to the built .rbxl place file | |
place-id | no | Explicit place ID; disambiguates same-named places | |
flipbook-rbxm | no | Path to a local Flipbook.rbxm; skips downloading from GitHub | |
cli-version | no | flipbook-cli version to install, without a leading v | 0.6.0 |
rokit-version | no | Rokit version used to install the CLI | v1.2.0 |
github-token | no | Token for release downloads and preview comments | workflow token |
comment | no | Post 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:
- Resolves
--place-nameto a place in the universe (or creates one viaCreatePlaceAsyncfrom the start place). - Publishes
--place-fileto that place. - Injects the latest Flipbook runtime into
ReplicatedStorage.Flipbook.
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