-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
147 changed files
with
3,745 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.