Skip to content

chore: vercel preview comment 예쁘게 🀩 #58

chore: vercel preview comment 예쁘게 🀩

chore: vercel preview comment 예쁘게 🀩 #58

Workflow file for this run

name: Vercel Preview Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
Deploy-Preview:

Check failure on line 9 in .github/workflows/deploy-preview.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/deploy-preview.yaml

Invalid workflow file

You have an error in your yaml syntax on line 9
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install Vercel CLI
run: bun install --global vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
id: deploy
run: |
output=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})
echo "::set-output name=url::$(echo "$output" | grep -oP 'https://.*\.vercel\.app')"
- name: Get Project Name
id: project-name
run: echo "name=$(echo ${{ github.repository }} | cut -d'/' -f2)" >> $GITHUB_OUTPUT
- name: Find Comment
uses: peter-evans/find-comment@v2
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: "github-actions[bot]"
body-includes: "The latest updates on your projects"
- name: Create or Update Comment
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
**The latest updates on your projects**.
| Name | Status | Preview | Updated (UTC) |
| ---- | ------ | ------- | ------------- |
| **${{ steps.project-name.outputs.name }}** | βœ… Ready ([Inspect](https://vercel.com/dashboard)) | [Visit Preview](${{ steps.deploy.outputs.url }}) | ${{ github.event.pull_request.updated_at | date('YYYY-MM-DD HH:mm:ss', '+9 hours') }} |
edit-mode: replace