Skip to content

Commit

Permalink
Merge branch 'main' into add-UT-HAI-client-deliberation
Browse files Browse the repository at this point in the history
  • Loading branch information
patcon committed Oct 7, 2024
2 parents bfb5900 + efb4cef commit 7f5f8fe
Show file tree
Hide file tree
Showing 7 changed files with 552 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/deploy-github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- 'main'
pull_request:
types: [opened, synchronize, reopened]

permissions:
contents: read
Expand All @@ -18,8 +20,12 @@ jobs:
with:
submodules: true

# See: https://github.com/bitovi/github-actions-storybook-to-github-pages
- uses: bitovi/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
path: storybook-static
build_command: "npx sb-branch-switcher --config .storybook/.branches.json"
path: dist/storybook-bundle
# Done manually so we can checkout submodule
checkout: false
12 changes: 12 additions & 0 deletions .storybook/.branches.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"from": "dist/storybook",
"to": "dist/storybook-bundle",
"script_name": "build-storybook-branch",
"default_branch": "main",
"default_root": true,
"provider": {
"type": "github",
"owner": "CivicTechTO",
"repository": "polis-storybook"
}
}
1 change: 1 addition & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const config = {
"@chromatic-com/storybook",
"@storybook/addon-interactions",
"storybook-addon-remix-react-router",
"storybook-branch-switcher",
],
framework: {
name: "@storybook/react-webpack5",
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ setup: ## Install packages and polis codebase
run: ## Run storybook development environment
npm run storybook

build: ## Build static storybook for deploy
npm run build-storybook

build-all-branches: ## Build static storybook for all PR branches (requires GITHUB_TOKEN)
npx sb-branch-switch --config .storybook/.branches.json

%:
@true

Expand Down
Loading

0 comments on commit 7f5f8fe

Please sign in to comment.