-
Notifications
You must be signed in to change notification settings - Fork 42
46 lines (37 loc) · 1.36 KB
/
pr-preview.yml
File metadata and controls
46 lines (37 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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/cli@8.4.1
- 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 }}/)'