Skip to content

chore(deps): update all non-major dependencies #12

chore(deps): update all non-major dependencies

chore(deps): update all non-major dependencies #12

# 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/[email protected]
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 <[email protected]>" --no-history
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}