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

Provide storybook builds for multiple branches

License

Notifications You must be signed in to change notification settings

pascalgn/storybook-branches

Repository files navigation

storybook-branches

Docker build status License

Provide storybook builds for multiple branches and add a dropdown to quickly switch between those branches


Switching between different versions on branches storybook-1, storybook-2 and storybook-3

Usage

Start

docker run --rm \
    -p 9001:9001 \
    -e "REPOSITORY=https://github.com/pascalgn/storybook-branches" \
    -e "BRANCHES=storybook.+" \
    pascalgn/storybook-branches:latest

Options

The following environment variables are required:

  • REPOSITORY The URL of the remote repository

Additionally, the following environment variables are supported:

  • DIR The subdirectory within the repository (default .)
  • PORT The port to run the HTTP server on (default 9001)
  • BRANCHES Regular expression filter of the branches to build (default .+)
  • DEFAULT Default branch to display (default remote branch will be used if unset)
  • SLEEP The time to sleep between fetches, in seconds (default 60)
  • OUTPUT The output directory (default dist)
  • LOG_LEVEL A winston log level (default info)

Additionally, the following environment variables are available for providing SSH keys, to connect to the remote repository:

  • KNOWN_HOSTS The SSH host keys (stored in ~/.ssh/known_hosts)
  • ID_RSA The private SSH key (stored in ~/.ssh/id_rsa)

License

MIT