Skip to content

Commit

Permalink
build: add deploy process
Browse files Browse the repository at this point in the history
  • Loading branch information
ttpss930141011 committed Nov 20, 2023
1 parent f2b932d commit fcb4632
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Use Vercel CLI to use `npm run publish-storybook` to deploy to Vercel

name: CD workflow

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

on:
push:
branches:
- main

jobs:
init:
name: Deploy
runs-on: ubuntu-latest

steps:
- name: Git checkout
uses: actions/checkout@v3

- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: node_modules
key: deps-node-modules-${{ hashFiles('**/pnpm-lock.yaml') }}

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 7.1.5
run_install: false

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pnpm install

# Build Storybook
- name: Build Storybook
run: npm run build-storybook

# Deploy to Vercel
- name: Deploy to Vercel
uses: amondnet/vercel-action@v25 #deploy
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
github-token: ${{ secrets.GIT_TOKEN }} #Optional
vercel-args: '--prod' #Optional
vercel-org-id: ${{ secrets.ORG_ID}} #Required
vercel-project-id: ${{ secrets.PROJECT_ID}} #Required
working-directory: ./
5 changes: 5 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"version": 2,
"public": false,
"github": {
"enabled": false
},
"$schema": "https://openapi.vercel.sh/vercel.json",
"buildCommand": "npm run build-storybook",
"devCommand": "npm run storybook",
Expand Down

1 comment on commit fcb4632

@ttpss930141011
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for vue-wafer-painter ready!

✅ Preview
https://vue-wafer-painter-l939nz5js-ttpss930141011.vercel.app

Built with commit fcb4632.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.