Skip to content

Commit

Permalink
vercel 종속성 설치 및 preview yml 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
YOOJS1205 committed Dec 9, 2023
1 parent d353047 commit 30b370a
Show file tree
Hide file tree
Showing 147 changed files with 3,745 additions and 39 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Preview

on: pull_request

jobs:
build-and-preview:
name: Preview
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Cache .yarn/cache Directory
uses: actions/cache@v3
with:
path: .yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "18"

- name: Check for Cached .yarn/cache
id: yarn-cache-check
run: |
if [ -d .yarn/cache ]; then
echo "Yarn Cache found!"
echo "yarn-cache-hit=true" >> $GITHUB_ENV
fi
- name: Install Dependencies
run: |
if [ ${{ env.yarn-cache-hit }} != 'true' ]; then
echo "Installing all dependencies..."
yarn install
else
echo "Restoring .yarn/cache from cache..."
yarn install --immutable
fi
- name: Run Build
run: yarn build

- name: Vercel Deployment
uses: vercel/[email protected]
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Vercel 토큰을 GitHub Secrets에 설정하세요.
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} # Vercel Organization ID를 GitHub Secrets에 설정하세요.
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} # Vercel Project ID를 GitHub Secrets에 설정하세요.
env:
VERCEL_ENV: preview
Loading

0 comments on commit 30b370a

Please sign in to comment.