-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add storybookw workflow for main and develop branches
- Configure GitHub Actions to deploy Storybook on pushes to main and develop branches - Deploy to different directories for main (storybook) and develop (storybook-develop)
- Loading branch information
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Deploy Storybook Production | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
paths: | ||
- client/** | ||
|
||
defaults: | ||
run: | ||
working-directory: ./client | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
run_install: false | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: "pnpm" | ||
cache-dependency-path: "./client/pnpm-lock.yaml" | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Build storybook | ||
run: pnpm run build-storybook | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./client/storybook-static | ||
destination_dir: ${{ github.ref == 'refs/heads/main' && 'storybook' || 'storybook-develop' }} |