Skip to content

Commit

Permalink
test deploy storybooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando Colom committed Aug 14, 2023
1 parent 012f2b7 commit e17c1f0
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/deploy-storybooks.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Deploy Storybooks

on:
push:
paths: ["storybook/**"]
on: [push]

permissions:
contents: read
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,45 @@ jobs:
- run: bash ./scripts/release-notes.sh
env:
RELEASE_SLACK_WEBHOOK_URL: ${{secrets.RELEASE_SLACK_WEBHOOK_URL}}

build-and-deploy-storybooks:
needs: publish-npm
runs-on: ubuntu-latest

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

concurrency:
group: "pages"

permissions:
contents: read
pages: write
id-token: write

steps:
- uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16'

# Build docs from storybooks
- run: npm install
- run: npm run storybook-web-docs

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# Upload entire repository
path: './docs/'
name: docs

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
with:
artifact_name: 'docs'
github-token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 6 additions & 0 deletions .storybook/manager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import {addons} from '@storybook/addons';
import yourTheme from './theme';

addons.setConfig({
theme: yourTheme,
});
9 changes: 9 additions & 0 deletions .storybook/theme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import {create} from '@storybook/theming';

export default create({
base: 'light',
brandTitle: 'Janis UI apps',
brandUrl: 'https://janis.im',
brandImage: 'https://app.janis.in/static/media/janis-logo-base.0cc15e53.svg',
brandTarget: 'https://janis.im',
});

0 comments on commit e17c1f0

Please sign in to comment.