Skip to content

fix: ts types

fix: ts types #626

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Build Storybook
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache pnpm modules
uses: actions/cache@v4
env:
cache-name: cache-pnpm-modules
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
- uses: pnpm/action-setup@v4.0.0
with:
run_install: true
- name: Build project
run: |
cd storybook
npm run build
mkdir -p dist/scripts
wget https://github.com/Innei/Shiro/raw/main/scripts/vercel-build-pre.sh > dist/scripts/vercel-build-pre.sh
echo "shiro.innei.in" > dist/CNAME
env:
CI: true
- name: Deploy with gh-pages
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npx gh-pages -d storybook/dist -u "github-actions-bot <support+actions@github.com>" --no-history
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}