Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

Commit

Permalink
update prod action
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperkristensen committed Aug 7, 2023
1 parent 0ca0a18 commit 426e4da
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/vercel-preview.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Preview of Storybook to Vercel
name: Deploy Storybook Preview
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
Expand All @@ -8,7 +8,6 @@ on:
- main
jobs:
deploy:
name: Build and Deploy Storybook to Vercel
timeout-minutes: 15
runs-on: ubuntu-latest

Expand All @@ -33,7 +32,7 @@ jobs:
- name: Build
run: yarn build

- name: Change directory and build storybook
- name: Change directory
run: cd ./packages/ui

- name: Pull Vercel Environment Information
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/vercel-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy Storybook
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_PROD }}
on:
push:
branches:
- main
jobs:
deploy:
timeout-minutes: 15
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'

- name: Install Vercel CLI
run: npm install --global vercel@latest

- name: Install dependencies
run: yarn

- name: Build
run: yarn build

- name: Change directory
run: cd ./packages/ui

- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}




0 comments on commit 426e4da

Please sign in to comment.