Skip to content

[Refactor] Survey Question Zustand๋กœ ๊ด€๋ฆฌ & ํŽ˜์ด์ง€ ๋‚ด ๋””ํ…Œ์ผ ์ˆ˜์ • & ์ด๋ฉ”์ผ ์ „์†ก API ์—ฐ๊ฒฐ #496

[Refactor] Survey Question Zustand๋กœ ๊ด€๋ฆฌ & ํŽ˜์ด์ง€ ๋‚ด ๋””ํ…Œ์ผ ์ˆ˜์ • & ์ด๋ฉ”์ผ ์ „์†ก API ์—ฐ๊ฒฐ

[Refactor] Survey Question Zustand๋กœ ๊ด€๋ฆฌ & ํŽ˜์ด์ง€ ๋‚ด ๋””ํ…Œ์ผ ์ˆ˜์ • & ์ด๋ฉ”์ผ ์ „์†ก API ์—ฐ๊ฒฐ #496

Workflow file for this run

name: Vercel Preview deployment
on:
pull_request:
branches: ['main', 'develop']
workflow_dispatch:
jobs:
vercel-preview-deployment:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
pull-requests: write
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
steps:
- name: Checkout To Repository
uses: actions/checkout@v4
- name: pnpm ์„ค์ •
uses: pnpm/action-setup@v4
with:
version: 8
- name: Node.js ์„ค์ •
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: pnpm ์˜์กด์„ฑ ์„ค์น˜
run: pnpm install
- name: Vercel CLI ์„ค์น˜
run: pnpm install --global vercel@latest
- name: Next.js ๋นŒ๋“œ ์บ์‹œ ์‚ญ์ œ
run: rm -rf .next
- name: Vercel preview ํ™˜๊ฒฝ pull
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: Vercel ํ”„๋กœ์ ํŠธ ๋นŒ๋“œ
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- name: Vercel Preview ๋ฐฐํฌ
id: deploy
run: |
DEPLOY_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})
echo "preview_url=$DEPLOY_URL" >> $GITHUB_OUTPUT
- name: UTC to KST ๋ณ€ํ™˜
id: convert_utc_to_kst
run: |
TS="${{ github.event.pull_request.updated_at }}"
KST=$(date -d "$TS +9 hours" +"%Y-%m-%d %H:%M:%S")
echo "kst_time=$KST" >> $GITHUB_OUTPUT
- name: Comment์— Preview URL ๊ธฐ๋ก
uses: thollander/actions-comment-pull-request@v2
with:
message: |
### โœจ Vercel Preview Deployed
๐Ÿ“ฆ PR #${{ github.event.pull_request.number }} by @${{ github.event.pull_request.user.login }}
๐ŸŒฟ [${{ github.head_ref }}] โ†’ [${{ github.base_ref }}]
๐Ÿ“… KST ${{ steps.convert_utc_to_kst.outputs.kst_time }}
#### ๐Ÿ”— Links
**[โœจ Preview ์‚ฌ์ดํŠธ ๋ณด๋Ÿฌ๊ฐ€๊ธฐ](${{ steps.deploy.outputs.preview_url }})**
> ๐Ÿ’ก ๋ณ€๊ฒฝ์‚ฌํ•ญ์„ ์‹ค์ œ ํ™˜๊ฒฝ์—์„œ ํ™•์ธํ•ด๋ณด์„ธ์š”!
---
*Powered by Vercel* โšก
comment_tag: 'vercel_deploy_${{ github.event.pull_request.number }}'
mode: 'upsert'
- name: ๋ฐฐํฌ ๊ฒฐ๊ณผ ์š”์•ฝ
if: always()
run: |
echo "๐ŸŽฏ ========================================="
echo "๐Ÿ Vercel Preview Deployment Complete"
echo "๐ŸŽฏ ========================================="
echo "๐Ÿ“ฆ PR Number: #${{ github.event.pull_request.number }}"
echo "๐ŸŒฟ Source: ${{ github.head_ref }}"
echo "๐ŸŽฏ Target: ${{ github.base_ref }}"
echo "๐Ÿ“ Commit: ${{ github.sha }}"
echo "โšก Job Status: ${{ job.status }}"
echo "๐ŸŒ Deploy Status: ${{ steps.deploy.outcome }}"
echo "๐Ÿ”— Preview URL: ${{ steps.deploy.outputs.preview_url }}"
echo "โฐ Completed at: $(date)"
echo "๐ŸŽฏ ========================================="