dev: migrate to pnpm #9
Workflow file for this run
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: PR Preview | |
| on: | |
| pull_request: | |
| jobs: | |
| main: | |
| name: Build and Deploy Storybook | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm run deps:ci | |
| - name: Install Storybook CLI | |
| run: pnpm i @storybook/[email protected] | |
| - name: Build Storybook | |
| run: pnpm run sb:build | |
| - name: Upload to S3 | |
| uses: gravity-ui/preview-upload-to-s3-action@v1 | |
| with: | |
| src-path: storybook-static | |
| dest-path: /md-editor/pulls/${{ github.event.pull_request.number }}/ | |
| s3-key-id: ${{ secrets.STORYBOOK_S3_KEY_ID }} | |
| s3-secret-key: ${{ secrets.STORYBOOK_S3_SECRET_KEY }} | |
| - name: Create Comment | |
| uses: marocchino/sticky-pull-request-comment@v2 | |
| with: | |
| GITHUB_TOKEN: ${{ secrets.GRAVITY_UI_BOT_GITHUB_TOKEN }} | |
| header: preview | |
| number: ${{ github.event.pull_request.number }} | |
| message: '[](https://preview.gravity-ui.com/md-editor/${{ github.event.pull_request.number }}/)' |