storybook-deployer icon indicating copy to clipboard operation
storybook-deployer copied to clipboard

Works locally but I get an error on Travis

Open philipbeadle opened this issue 6 years ago • 6 comments

I'd love to have my storybook deploy auto but I keep hitting this 128 error

storybook-to-ghpages => Getting the git remote URL executing: git config --get remote.origin.url => Building storybook executing: npm run build-storybook -- -o out7256 executing: git init executing: git config user.name "GH Pages Bot" executing: git config user.email "[email protected]" executing: git config commit.gpgsign false executing: git add . executing: git commit -m "Deploy Storybook to GitHub Pages" => Deploying storybook executing: git push --force --quiet https://github.com/Holochain/web-components.git master:gh-pages /home/travis/build/Holochain/web-components/node_modules/@storybook/storybook-deployer/src/utils.js:16 throw new Error(message); ^ Error: Exec code(128) on executing: git push --force --quiet https://github.com/Holochain/web-components.git master:gh-pages undefined at Object.exec (/home/travis/build/Holochain/web-components/node_modules/@storybook/storybook-deployer/src/utils.js:16:9) at Object. (/home/travis/build/Holochain/web-components/node_modules/@storybook/storybook-deployer/bin/storybook_to_ghpages:68:14) at Module._compile (module.js:635:30) at Object.Module._extensions..js (module.js:646:10) at Module.load (module.js:554:32) at tryModuleLoad (module.js:497:12) at Function.Module._load (module.js:489:3) at Function.Module.runMain (module.js:676:10) at startup (bootstrap_node.js:187:16) at bootstrap_node.js:608:3

philipbeadle avatar Dec 29 '17 11:12 philipbeadle

Hello ;)

I actually did a presentation on this at All Things Open this year...

See the deployment section for step by step notes with Travis: http://bit.do/ato2017

I use a deployment key (as it’s more secure than personal access tokens), but you’ll want to securely enable your Travis build to push first.

There is also examples in our github project, patternfly/patternfly-react. Hope it helps!

priley86 avatar Dec 29 '17 13:12 priley86

I'm having the same issue, I don't know if the error itself comes from the package (it could be a setup error on Travis). I do feel the package should inform better what the error is, having an undefined at... is not informative enough and the developer experience around this obscure errors is super ugly.

I think the package should do some sanity checks before running exec before to give a better error handling.

In my case, it works locally but fails on Travis just as @philipbeadle describes it. Even when I have both personal tokens and deploy keys in the config, and the --ci does not solve this.

jeremenichelli avatar Jun 20 '18 10:06 jeremenichelli

Hey 👋 what is the latest with this one ❔ Could you find a way to have this working?

paschalidi avatar Apr 07 '19 20:04 paschalidi

Just ran into this issue, and I can confirm that the --ci flag fixes the build (assuming the build fails on the git push --force step). In my case, I had to double the argument-passing dashes since I was using lerna to execute the npm script:

lerna run --scope @my-project/storybook deploy-storybook -- -- --ci

I believe this happens since git is trying to display an interactive yes/no prompt on the container, which needs to be bypassed to run without intervention.

indfnzo avatar May 02 '19 18:05 indfnzo

Try to create babel config file inside .storybook directory, to allow babel to build your project correctly.

Note: you can require the root babel config using babel.config.js file.

For more info please check https://storybook.js.org/docs/configurations/custom-babel-config/#docs-content

shadiabuhilal avatar Nov 05 '19 22:11 shadiabuhilal

I'm having same issue with GitHub actions, --ci flag doesn't help.

Got Exec code(128) on executing: git push --force --quiet, guess dedicated babel config has nothing to do with that, because build step passes just fine (I tried it actually, it didn't work).

yukipastelcat avatar Jan 10 '20 22:01 yukipastelcat