Skip to content

Commit

Permalink
Add ci actions to release and generate storybook on push to main
Browse files Browse the repository at this point in the history
  • Loading branch information
draedful committed Oct 4, 2024
1 parent 59cf335 commit 82a6aef
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/main-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Main Preview

on:
push:
branches: [main]

jobs:
main:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- 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 build-storybook
shell: bash
- name: Upload to S3
uses: gravity-ui/preview-upload-to-s3-action@v1
with:
src-path: storybook-static
dest-path: /graph/main/
s3-key-id: ${{ secrets.STORYBOOK_S3_KEY_ID }}
s3-secret-key: ${{ secrets.STORYBOOK_S3_SECRET_KEY }}
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Release

on:
push:
branches:
- main
- release/v*

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Release from ${{ github.ref_name }}
uses: gravity-ui/release-action@v1
with:
github-token: ${{ secrets.GRAVITY_UI_BOT_GITHUB_TOKEN }}
npm-token: ${{ secrets.GRAVITY_UI_BOT_NPM_TOKEN }}
node-version: 18
default-branch: ${{ github.ref_name != 'main' && github.ref_name || null }}
npm-dist-tag: ${{ github.ref_name != 'main' && 'untagged' || 'latest' }}

0 comments on commit 82a6aef

Please sign in to comment.