Skip to content

try to fix validation #3

try to fix validation

try to fix validation #3

Workflow file for this run

name: Build
on:
push:
branches:
- main
pull_request:
branches:
- '**'
jobs:
build-storybook:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v4
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm install --ci
- name: Prepare deployment
run: npm run build:storybook
- name: Fix permissions
run: chmod -c -R +rX storybook-static/
- name: Upload artifact
id: upload-artifact
uses: actions/upload-artifact@v4
with:
name: github-pages
path: storybook-static/
retention-days: 30
deploy-storybook:
runs-on: ubuntu-latest
needs: build-storybook
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4