Skip to content

Commit

Permalink
chore: Implement Storybook publishing to GitHub pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericof committed Jul 14, 2022
1 parent 4cfb52e commit 200dd15
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Storybook
on:
push:
branches:
- main

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]

- name: Create a new Volto project
run: |
make project
- name: Generate Storybook
run: |
make storybook
- name: Deploy to GitHub pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: addon-testing-project/storybook-static
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,24 @@ YELLOW=`tput setaf 3`


# Top-level targets

.PHONY: project
project:
addon-testing-project/package.json:
npm install -g yo
npm install -g @plone/generator-volto
npm install -g mrs-developer
rm -Rf addon-testing-project
npx -p @plone/scripts addon clone https://github.com/${GIT_USER}/${GIT_NAME}.git --branch ${GIT_BRANCH}
@echo "-------------------"
@echo "$(GREEN)Volto project is ready!$(RESET)"

.PHONY: project
project: addon-testing-project/package.json
@echo "$(RED)Now run: cd addon-testing-project && yarn start$(RESET)"

.PHONY: storybook
storybook: addon-testing-project/package.json
@echo "$(GREEN)Create Storybook$(RESET)"
(cd addon-testing-project && yarn build-storybook)

.PHONY: all
all: project

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ Addon implementing a code block with syntax highlight for [Plone](https://plone.

- [Plone Brasil](https://plone.org.br)


You can also check its [Storybook](https://plonegovbr.github.io/volto-code-block/).

## Install

### New Volto Project
Expand Down

0 comments on commit 200dd15

Please sign in to comment.