[BugFix] CMS VOD 재생 패널 임시 비활성화 및 v1.2.6 반영 #4
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 Deploy | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| permissions: | |
| contents: read | |
| issues: write | |
| pull-requests: write | |
| concurrency: | |
| group: vercel-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| VERCEL_ORG_ID: team_L6hInSgXtbBGFjyNyumPtH4Y | |
| VERCEL_PROJECT_ID: prj_deNXN4DprffNtv96E3tT2qlpkbdP | |
| jobs: | |
| preview: | |
| name: Deploy Preview | |
| if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository | |
| runs-on: ubuntu-latest | |
| env: | |
| VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - name: Ensure Vercel token exists | |
| run: | | |
| if [ -z "$VERCEL_TOKEN" ]; then | |
| echo "Missing VERCEL_TOKEN GitHub secret." >&2 | |
| exit 1 | |
| fi | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Typecheck | |
| run: npm run typecheck | |
| - name: Install Vercel CLI | |
| run: npm install --global vercel@latest | |
| - name: Pull preview environment | |
| run: vercel pull --yes --environment=preview --token="$VERCEL_TOKEN" | |
| - name: Build preview | |
| run: vercel build --token="$VERCEL_TOKEN" | |
| - name: Deploy preview | |
| id: deploy | |
| run: | | |
| set -euo pipefail | |
| vercel deploy --prebuilt --token="$VERCEL_TOKEN" > deployment-url.txt | |
| URL="$(tail -n 1 deployment-url.txt | tr -d '\r')" | |
| if [ -z "$URL" ]; then | |
| echo "Preview deployment URL was not returned." >&2 | |
| exit 1 | |
| fi | |
| echo "url=$URL" >> "$GITHUB_OUTPUT" | |
| { | |
| echo "### Preview Deployment" | |
| echo | |
| echo "$URL" | |
| } >> "$GITHUB_STEP_SUMMARY" | |
| - name: Comment preview URL on PR | |
| uses: actions/github-script@v7 | |
| env: | |
| PREVIEW_URL: ${{ steps.deploy.outputs.url }} | |
| with: | |
| script: | | |
| const marker = '<!-- vercel-preview-url -->'; | |
| const body = [ | |
| marker, | |
| `Vercel preview is ready: ${process.env.PREVIEW_URL}`, | |
| ].join('\n'); | |
| const { owner, repo } = context.repo; | |
| const issue_number = context.issue.number; | |
| const comments = await github.paginate(github.rest.issues.listComments, { | |
| owner, | |
| repo, | |
| issue_number, | |
| per_page: 100, | |
| }); | |
| const existing = comments.find((comment) => | |
| comment.user.type === 'Bot' && comment.body.includes(marker) | |
| ); | |
| if (existing) { | |
| await github.rest.issues.updateComment({ | |
| owner, | |
| repo, | |
| comment_id: existing.id, | |
| body, | |
| }); | |
| return; | |
| } | |
| await github.rest.issues.createComment({ | |
| owner, | |
| repo, | |
| issue_number, | |
| body, | |
| }); | |
| production: | |
| name: Deploy Production | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| env: | |
| VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - name: Ensure Vercel token exists | |
| run: | | |
| if [ -z "$VERCEL_TOKEN" ]; then | |
| echo "Missing VERCEL_TOKEN GitHub secret." >&2 | |
| exit 1 | |
| fi | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Typecheck | |
| run: npm run typecheck | |
| - name: Install Vercel CLI | |
| run: npm install --global vercel@latest | |
| - name: Pull production environment | |
| run: vercel pull --yes --environment=production --token="$VERCEL_TOKEN" | |
| - name: Build production | |
| run: vercel build --prod --token="$VERCEL_TOKEN" | |
| - name: Deploy production | |
| run: | | |
| set -euo pipefail | |
| vercel deploy --prebuilt --prod --token="$VERCEL_TOKEN" > deployment-url.txt | |
| URL="$(tail -n 1 deployment-url.txt | tr -d '\r')" | |
| if [ -z "$URL" ]; then | |
| echo "Production deployment URL was not returned." >&2 | |
| exit 1 | |
| fi | |
| { | |
| echo "### Production Deployment" | |
| echo | |
| echo "$URL" | |
| } >> "$GITHUB_STEP_SUMMARY" |