Merge branch 'main' of github.com:scalar/scalar #7
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 | |
on: | |
push: | |
branches: | |
- 'main' | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
release: | |
name: Deploy Scalar Components Storybook | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
node-version: [22] | |
steps: | |
- uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f | |
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@08f58d1471bff7f3a07d167b4ad7df25d5fcfcb6 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: Install netlify | |
run: pnpm install -g netlify | |
- name: Generate Run UUID | |
run: echo "DEPLOY_ID=$(uuidgen)" >> "$GITHUB_ENV" && echo $DEPLOY_ID | |
- name: Install dependencies | |
run: pnpm --filter components... install | |
- name: Build components and dependencies | |
run: pnpm --filter components... build | |
- name: Build storybook | |
run: pnpm --filter components build:storybook | |
env: | |
DEPLOY_ID: ${{ env.DEPLOY_ID }} | |
- name: Deploy Storybook to Netlify (Production) | |
run: | | |
netlify deploy --dir "./packages/components/storybook-static" \ | |
--message "Deployed from GitHub (${{ env.DEPLOY_ID }})" \ | |
--site ${{ vars.NETLIFY_SITE_ID_COMPONENTS }} \ | |
--auth ${{ secrets.NETLIFY_AUTH_TOKEN }} \ | |
--filter @scalar/components --prod |