Skip to content

Commit

Permalink
EPMRPP-90190 || Add dev deployment workflow for storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
AmsterGet committed Apr 29, 2024
1 parent d08f3a3 commit 2b9c38a
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Deploy dev storybook showcase
env:
BUILD_DIR : "storybook-static/"

on:
# TODO: enable auto-publishing once all quality gates are set
# push:
# branches:
# - develop
workflow_dispatch:

jobs:
deploy_dev:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Build storybook
run: npm run build:storybook

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./${{ env.BUILD_DIR }}
publish_branch: gh-pages
commit_message: ${{ github.event.head_commit.message }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ lerna-debug.log*

node_modules
dist
storybook-static
dist-ssr
*.local
.npmrc
Expand Down
4 changes: 4 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@ const config: StorybookConfig = {
docs: {
autodocs: 'tag',
},
managerHead: (head) => `
${head}
<meta name="robots" content="noindex" />
`,
};
export default config;

0 comments on commit 2b9c38a

Please sign in to comment.