Skip to content

Commit a5f6cd2

Browse files
authored
ci: added branch preview (#447)
1 parent c3d218d commit a5f6cd2

File tree

2 files changed

+34
-3
lines changed

2 files changed

+34
-3
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Branch Preview
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
main:
7+
name: Build and Deploy
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v3
12+
with:
13+
ref: ${{ github.event.pull_request.head.sha }}
14+
- name: Setup Node
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version: 18
18+
cache: npm
19+
- name: Install Packages
20+
run: npm ci
21+
shell: bash
22+
- name: Build Storybook
23+
run: npm run storybook:build
24+
shell: bash
25+
- name: Upload to S3
26+
uses: gravity-ui/preview-upload-to-s3-action@v1
27+
with:
28+
src-path: storybook-static
29+
dest-path: /md-editor/${{ github.ref_name }}/
30+
s3-key-id: ${{ secrets.STORYBOOK_S3_KEY_ID }}
31+
s3-secret-key: ${{ secrets.STORYBOOK_S3_SECRET_KEY }}

.github/workflows/prerelease.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
on: workflow_dispatch
1+
name: Prerelease
22

3-
name: prerelease
3+
on: workflow_dispatch
44

55
jobs:
66
prerelease:
@@ -18,4 +18,4 @@ jobs:
1818
- run: npm version --no-git-tag-version 0.0.0-rc-$(git branch --show-current)-$(date "+%Y%m%d%H%M")
1919
- run: npm publish --no-tag
2020
env:
21-
NODE_AUTH_TOKEN: ${{secrets.ROBOT_DATAUI_NPM_TOKEN}}
21+
NODE_AUTH_TOKEN: ${{secrets.GRAVITY_UI_BOT_NPM_TOKEN}}

0 commit comments

Comments
 (0)