storybook-deployer
storybook-deployer copied to clipboard
Error when run yarn deploy-storybook --ci in CircleCi
Hey guys,
I'm having an error while trying to deploy with CircleCi.
I don't know what's happening, because the problem began to appear now, and before that, it was already working.
my config:
version: 2 # use CircleCI 2.0
jobs:
build:
docker:
- image: circleci/node:9-stretch
environment:
TZ: "/usr/share/zoneinfo/America/Sao_Paulo"
steps:
- checkout # special step to check out source code to working directory
- run: sudo apt-get update
- run: sudo apt-get install apt-transport-https
- run: curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
- run: echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
- run: sudo apt-get update && sudo apt-get install yarn && yarn
- save_cache: # special step to save the dependency cache
key: dependency-cache-{{ checksum "package.json" }}
paths:
- ./node_modules
- run:
name: Run React Tests
command: yarn jest --no-cache --runInBand
deploy:
docker:
- image: circleci/node:12.2.0
environment:
GH_TOKEN: "MY_GH_TOKEN"
NPM_TOKEN: "MY_NPM_TOKEN"
steps:
- checkout
- run: sudo apt-get update
- run: sudo apt-get install apt-transport-https
- run: curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
- run: echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
- run: sudo apt-get update && sudo apt-get install yarn && yarn
- run:
name: Deploy Storybook
command: yarn deploy-storybook --ci
release:
docker:
- image: circleci/node:9-stretch
environment:
GH_TOKEN: "MY_GH_TOKEN"
NPM_TOKEN: "MY_NPM_TOKEN"
steps:
- checkout
- run: sudo apt-get update
- run: sudo apt-get install apt-transport-https
- run: curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
- run: echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
- run: sudo apt-get update && sudo apt-get install yarn && yarn
# Run optional required steps before releasing
# - run: npm run build-script
- run: yarn semantic-release
workflows:
version: 2
test_and_release:
jobs:
- build
- deploy:
requires:
- build
- release:
requires:
- build
This is the error:
Can someone help me?
try to run npm run build-storybook
. I think it will give you better error message
@rafaelmusetti Did you figure this out? I'm getting the same error running this in Github Actions
In my case, when I run npm run build-storybook
in CI, it works just fine.
Have similar issue, this repo only works with npm
?
If it builds your storybook before deploying, it uses npm
, even if you used yarn to run the deploy-storybook
command. Since I'm using nvm this causes other issues :-(