refactor: Change DotLottie To Custom loading component (#45) #16
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
| name: Deploy Storybook Production | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| paths: | |
| - 'client/**' | |
| - 'core/**' | |
| - '.github/workflows/storybook-*.yml' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v3 | |
| with: | |
| version: 9 | |
| run_install: false | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'pnpm' | |
| cache-dependency-path: '**/pnpm-lock.yaml' | |
| - name: Install all dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build core package | |
| run: | | |
| echo "Building core package..." | |
| pnpm --filter @troublepainter/core build | |
| echo "Core build output:" | |
| ls -la core/dist/ | |
| - name: Verify core build | |
| run: | | |
| if [ ! -f "core/dist/index.mjs" ]; then | |
| echo "Core build failed - index.mjs not found" | |
| exit 1 | |
| fi | |
| - name: Build storybook | |
| working-directory: ./client | |
| run: | | |
| echo "Building Storybook with core from $(realpath ../core/dist/)" | |
| pnpm build-storybook | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./client/storybook-static | |
| destination_dir: ${{ github.ref == 'refs/heads/main' && 'storybook' || 'storybook-develop' }} | |
| keep_files: true | |
| commit_message: 'docs: deploy storybook' |