-
Notifications
You must be signed in to change notification settings - Fork 71
support for Storybook deployer for git Lab pages #62
Comments
Did you succeed to deploy a static-storybook in gitlab pages ? Currently I try to do it with these
With a yarn build-storybook doing: |
Any news? 😄 |
I'm not sure if it helps anyone, but I can confirm that deploying to gitlab pages with their CI works. Here's my # Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
image: node:10.18.0-slim
# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
paths:
- node_modules/
# This job is required for GitLab Pages
pages:
stage: deploy
# Export storybook as a static site (to public)
script:
- npm install
- npm run build-storybook -- -o public
# Required artifact for GitLab Pages
artifacts:
paths:
- public
# Only run on the `storybook` branch
only:
- storybook |
@rdennis Can I just ask what version of Storybook you're using? As I am not able to run |
I can confirm that the following minimalist setup and steps work:
Naturally, this setup is only a starting point. Recommend that you test before deploy, cache as much as possible, only build on merges to |
I have the following storybook-related devDependencies:
But I run storybook itself via npx: |
Sorry, I've been off of this project for a bit. Our current processes uses storybook Here is our current # Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
image: node:11.0
# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
# per-branch cache
paths:
- node_modules/
# Determines order of stages (default: build, test, deploy)
stages:
- build
- test
- deploy
# Always runs first
install:
stage: .pre
script: npm install
# Builds components
build:
stage: build
script: npm run build
# Runs test suites
test:
stage: test
script: npm test
# This job is required for GitLab Pages
pages:
stage: deploy
# Export storybook as a static site (to public)
script: npm run build-dl-storybook -- -o public
# Required artifact for GitLab Pages
artifacts:
paths:
- public
# Only run on the `master` branch
only:
- master |
The only addition I would have is if you already have a public directory with static assets you may need to update the pages:
stage: pages
script:
- npm install
- npm run build:storybook
- mv dist/* public
artifacts:
paths:
- public
only:
- master Can see my full config file here - https://gitlab.com/jondotblack/jon.black/ |
How do you force storybook to load files from group.gitlab.com/repo instead of group.gitlab.com? Right now I'm just getting 404/Mime-type errors |
@verluci Did you find a solution? I'm having the same problem |
Is there a storybook deployer support for GitLab Pages (not for Git Hub pages)?
I need to understand how to manually integrate storybook serverless deployment onto Gitlab Pages. I read all the documentation and could not find a support doc for GitLab (found it for GitHub and AWS)
The text was updated successfully, but these errors were encountered: