Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

[Bug] Github Actions: build-storybook fails with no such directory #125

Open
chandlervdw opened this issue Jul 29, 2022 · 0 comments
Open
Labels

Comments

@chandlervdw
Copy link

Build step fails when deploying via GH Actions

With a workflow like this:

name: Deploy Storybook to Github Pages
on:
  push:
    branches:
      - main
      
jobs:
  Deploy-Storybook:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Install 🔧
        run: yarn install
        
      - name: Build & Deploy Storybook 🚀
        run: yarn run deploy-storybook -- --ci
        env:
          GH_TOKEN: ${{ secrets.GH_TOKEN }}

I get the following error during the build-storybook step, where foo is the repo:

Error: Exec code(1) on executing: npm run build-storybook -- -o out6551
info @storybook/react v6.5.9
info 
info => Cleaning outputDir: /home/runner/work/foo/foo/out6551
info => Loading presets
/home/runner/work/foo/foo/node_modules/@storybook/core-server/dist/cjs/utils/server-statics.js:109
    throw new Error((0, _tsDedent.default)((0, _chalk.default)`
          ^

Error: Failed to load static files, no such directory: /home/runner/work/foo/foo/public
Make sure this directory exists, or omit the -s (--static-dir) option.

I've even tried this with

      - name: Build & Deploy Storybook 🚀
        run: yarn run deploy-storybook -- --ci
        env:
          GH_TOKEN: ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}

Steps to reproduce the behavior

  1. Create a new GH Actions workflow using the template above with the latest version of this npm package installed
  2. Push to your main branch or tweak the workflow

Expected behavior

It should successfully deploy to gh-pages

Environment

  • OS: ubuntu-latest GH Actions CI
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

1 participant