Skip to content

Commit

Permalink
ci: added branch preview (#447)
Browse files Browse the repository at this point in the history
  • Loading branch information
makhnatkin authored Oct 28, 2024
1 parent c3d218d commit a5f6cd2
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/branch-preview.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Branch Preview

on: workflow_dispatch

jobs:
main:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- name: Install Packages
run: npm ci
shell: bash
- name: Build Storybook
run: npm run storybook:build
shell: bash
- name: Upload to S3
uses: gravity-ui/preview-upload-to-s3-action@v1
with:
src-path: storybook-static
dest-path: /md-editor/${{ github.ref_name }}/
s3-key-id: ${{ secrets.STORYBOOK_S3_KEY_ID }}
s3-secret-key: ${{ secrets.STORYBOOK_S3_SECRET_KEY }}
6 changes: 3 additions & 3 deletions .github/workflows/prerelease.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on: workflow_dispatch
name: Prerelease

name: prerelease
on: workflow_dispatch

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

0 comments on commit a5f6cd2

Please sign in to comment.