From c1f39c735337989e4d6432a2f601ffb7746a3146 Mon Sep 17 00:00:00 2001 From: dev-redo Date: Thu, 14 Mar 2024 15:29:01 +0900 Subject: [PATCH] chore: chore preview yml --- .github/workflows/storybook-preview.yml | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/workflows/storybook-preview.yml b/.github/workflows/storybook-preview.yml index 6107805e..a558a43b 100644 --- a/.github/workflows/storybook-preview.yml +++ b/.github/workflows/storybook-preview.yml @@ -2,21 +2,40 @@ name: Storybook Preview Deployment env: VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_STORYBOOK_PROJECT_ID }} - CACHE_PATH: /home/ubuntu/.cache/cds on: - workflow_dispatch: + # workflow_dispatch: + push: jobs: storybook-preview: - runs-on: [self-hosted, cds] + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 - uses: actions/setup-node@v3 with: node-version: 18.x + - uses: pnpm/action-setup@v2.2.1 + with: + version: 8 + + - uses: actions/cache@v3 + id: pnpm-cache + with: + path: node_modules + key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm- + - if: steps.pnpm-cache.outputs.cache-hit != 'true' + run: pnpm install --no-frozen-lockfile + + - name: Build Storybook + run: pnpm run build:storybook + - name: Install Vercel CLI run: npm install --global vercel@latest