mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
Move PR comment posting to a workflow_run-triggered pr-* workflow following the established two-workflow split pattern (see ci-size-data → pr-report). Uses post-pr-report-comment action with a unique HTML marker for idempotent comment upserts with full pagination. Addresses review feedback: https://github.com/Comfy-Org/ComfyUI_frontend/pull/11289#discussion_r3090292990 https://github.com/Comfy-Org/ComfyUI_frontend/pull/11289#discussion_r3090292996
77 lines
2.2 KiB
YAML
77 lines
2.2 KiB
YAML
---
|
|
name: 'CI: Vercel Website Preview'
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
paths:
|
|
- 'apps/website/**'
|
|
- 'packages/design-system/**'
|
|
- 'packages/tailwind-utils/**'
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'apps/website/**'
|
|
- 'packages/design-system/**'
|
|
- 'packages/tailwind-utils/**'
|
|
|
|
env:
|
|
VERCEL_ORG_ID: ${{ secrets.VERCEL_WEBSITE_ORG_ID }}
|
|
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_WEBSITE_PROJECT_ID }}
|
|
|
|
jobs:
|
|
deploy-preview:
|
|
if: github.event_name == 'pull_request'
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Install Vercel CLI
|
|
run: npm install --global vercel@latest
|
|
|
|
- name: Pull Vercel environment information
|
|
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_WEBSITE_TOKEN }}
|
|
|
|
- name: Build project artifacts
|
|
run: vercel build --token=${{ secrets.VERCEL_WEBSITE_TOKEN }}
|
|
|
|
- name: Deploy project artifacts to Vercel
|
|
id: deploy
|
|
run: |
|
|
URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_WEBSITE_TOKEN }})
|
|
echo "url=$URL" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Save PR metadata
|
|
run: |
|
|
mkdir -p temp/vercel-preview
|
|
echo "${{ steps.deploy.outputs.url }}" > temp/vercel-preview/url.txt
|
|
echo "${{ github.event.number }}" > temp/vercel-preview/number.txt
|
|
|
|
- name: Upload preview metadata
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: vercel-preview
|
|
path: temp/vercel-preview
|
|
|
|
deploy-production:
|
|
if: github.event_name == 'push'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Install Vercel CLI
|
|
run: npm install --global vercel@latest
|
|
|
|
- name: Pull Vercel environment information
|
|
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_WEBSITE_TOKEN }}
|
|
|
|
- name: Build project artifacts
|
|
run: vercel build --prod --token=${{ secrets.VERCEL_WEBSITE_TOKEN }}
|
|
|
|
- name: Deploy project artifacts to Vercel
|
|
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_WEBSITE_TOKEN }}
|