[Refactor] Survey Question Zustand๋ก ๊ด๋ฆฌ & ํ์ด์ง ๋ด ๋ํ ์ผ ์์ & ์ด๋ฉ์ผ ์ ์ก API ์ฐ๊ฒฐ #496
Workflow file for this run
This file contains hidden or 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
| 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 "๐ฏ =========================================" |