ci/storybook-github-pages #3
Workflow file for this run
This file contains hidden or 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
# Workflow | |
name: Storybook Publish | |
on: | |
pull_request: | |
branches: | |
- "main" | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
storybook: | |
name: Deploy Storybook | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22.13.1 | |
registry-url: https://npm.pkg.github.com/ | |
- name: Cache Node modules | |
uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm | |
- name: Install Node Dependencies | |
run: npm ci --cache .npm --prefer-offline | |
- name: Prepare to Deploy GH-Pages | |
run: npm run build | |
- name: Deploy to gh-pages | |
uses: bitovi/github-actions-storybook-to-github-pages@v1.0.3 | |
with: | |
build_command: npm run build | |
path: apps/storybook/dist | |
checkout: false |