Quick Start
TL;DR: Run one command to set up automatic Storybook deployments with PR previews.
What You'll Learn
- How to get your Scry credentials
- How to run the init command
- What happens after setup
Prerequisites
- [ ] A Storybook project with a
build-storybookscript - [ ] A GitHub repository (public or private)
- [ ] GitHub CLI installed and authenticated (
gh auth login)
Step 1: Get Your Credentials
Visit the Scry Dashboard and:
- Sign in with your GitHub account
- Create a new project
- Copy your Project ID and API Key
TIP
Your API key starts with scry_proj_ and is only shown once. Save it securely!
Step 2: Run the Init Command
From your project's root directory:
bash
npx @scry/scry init \
--projectId YOUR_PROJECT_ID \
--apiKey YOUR_API_KEYbash
pnpm dlx @scry/scry init \
--projectId YOUR_PROJECT_ID \
--apiKey YOUR_API_KEYbash
yarn dlx @scry/scry init \
--projectId YOUR_PROJECT_ID \
--apiKey YOUR_API_KEYStep 3: Verify Setup
The init command automatically:
- ✅ Creates
.storybook-deployer.jsonconfiguration - ✅ Generates GitHub Actions workflows
- ✅ Sets up repository variables and secrets
- ✅ Commits and pushes to GitHub
- ✅ Triggers the first deployment
Check your repository's Actions tab to see the deployment in progress.
What Happens Next?
Your Storybook now deploys automatically:
| Event | Result | URL Pattern |
|---|---|---|
| Push to main | Production deployment | /{project}/latest |
| Open PR | Preview deployment | /{project}/pr-{number} |
| Update PR | Preview updated | Same URL |
| Merge PR | Main updated | /{project}/latest |
Verification
After the first workflow completes, you should see:
- A successful workflow run in GitHub Actions
- Your Storybook live at the deployment URL
- A comment on PRs with preview links
bash
# Check your deployment
curl https://view.scry.com/{project}/latest/or simply visit the deployment URL in your browser.
Troubleshooting
"Not a git repository"
Initialize git first:
bash
git init
git remote add origin https://github.com/your-username/your-repo.git"GitHub CLI not found"
Install and authenticate GitHub CLI:
bash
# macOS
brew install gh
# Ubuntu/Debian
sudo apt install gh
# Then authenticate
gh auth loginSkip GitHub CLI Setup
If you prefer to set up secrets manually:
bash
npx @scry/scry init \
--projectId YOUR_PROJECT_ID \
--apiKey YOUR_API_KEY \
--skip-gh-setupThen manually add variables in Settings → Secrets and variables → Actions.
Next Steps
- First Deployment - Understand the deployment process
- GitHub Actions - Customize your workflows
- PR Previews - Set up preview comments