forked from dagster-io/dagster
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (39 loc) · 1.56 KB
/
build-storybook-core.yml
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
name: Deploy Storybook
on:
push:
branches:
- master
paths:
- js_modules/dagster-ui/packages/ui-core/**
pull_request:
paths:
- js_modules/dagster-ui/packages/ui-core/**
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Get branch preview subdomain
if: github.event_name == 'pull_request'
run: |
BRANCH_PREVIEW_SUBDOMAIN=$(echo "${{ github.head_ref || github.ref_name }}" | sed 's/[^a-zA-Z0-9-]/-/g' | sed 's/^-*//' | sed 's/-*$//')
echo "$BRANCH_PREVIEW_SUBDOMAIN"
echo "BRANCH_PREVIEW_SUBDOMAIN=$BRANCH_PREVIEW_SUBDOMAIN" >> "${GITHUB_ENV}"
- uses: actions/checkout@v4
- uses: amondnet/vercel-action@v25
if: github.event_name == 'pull_request'
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.STORYBOOK_CORE_VERCEL_PROJECT_ID }}
github-token: ${{ secrets.GITHUB_TOKEN }}
scope: ${{ secrets.VERCEL_ORG_ID }}
alias-domains: ${{ env.BRANCH_PREVIEW_SUBDOMAIN }}.core-storybook.dagster-docs.io
- uses: amondnet/vercel-action@v25
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.STORYBOOK_CORE_VERCEL_PROJECT_ID }}
vercel-args: '--prod'
github-token: ${{ secrets.GITHUB_TOKEN }}
scope: ${{ secrets.VERCEL_ORG_ID }}