Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated new storybook workflow #378

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 21 additions & 15 deletions .github/workflows/storybook-publish.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@
name: Storybook Publish

name: Build and Publish Storybook to GitHub Pages
on:
push:
branches:
- main
- 'main'
workflow_dispatch:

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

env:
NODE_VERSION: 20
NODE_CACHE: "yarn"

jobs:
publish:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected]
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/[email protected]
with:
node-version: ${{ env.NODE_VERSION }}
cache: ${{ env.NODE_CACHE }}
- name: Install dependencies
run: yarn install --immutable
- name: Build storybook
run: yarn build:storybook
- name: Deploy storybook
run: yarn deploy:storybook --ci --host-token-env-variable=GITHUB_TOKEN --source-branch main --branch gh-pages --existing-output-dir=storybook-static
env:
GITHUB_TOKEN: ${{ secrets.ARABOT_PAT_TRIGGER_WORKFLOW }}
- id: build-publish
uses: bitovi/[email protected]
with:
install_command: yarn install --immutable
build_command: yarn build-storybook
path: storybook-static
checkout: false
Loading