Skip to content

Commit

Permalink
ci: add preview workflow (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marginy605 authored Jan 23, 2023
1 parent a7aa264 commit 6ed7889
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/pr-preview-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: PR Preview Build

on:
pull_request:

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: gravity-ui/preview-build-action@v1
env:
TS_NODE_PROJECT: .storybook/tsconfig.json
22 changes: 22 additions & 0 deletions .github/workflows/pr-preview-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: PR Preview Deploy

on:
workflow_run:
workflows: ['PR Preview Build']
types:
- completed

jobs:
deploy:
name: Deploy
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- uses: gravity-ui/preview-deploy-action@v1
with:
project: chartkit
github-token: ${{ secrets.GRAVITY_UI_BOT_GITHUB_TOKEN }}
s3-key-id: ${{ secrets.STORYBOOK_S3_KEY_ID }}
s3-secret-key: ${{ secrets.STORYBOOK_S3_SECRET_KEY }}

0 comments on commit 6ed7889

Please sign in to comment.