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
49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
---
|
|
name: 'PR: Vercel Website Preview'
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: ['CI: Vercel Website Preview']
|
|
types:
|
|
- completed
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
actions: read
|
|
|
|
jobs:
|
|
comment:
|
|
runs-on: ubuntu-latest
|
|
if: >
|
|
github.repository == 'Comfy-Org/ComfyUI_frontend' &&
|
|
github.event.workflow_run.event == 'pull_request' &&
|
|
github.event.workflow_run.conclusion == 'success'
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Download preview metadata
|
|
uses: dawidd6/action-download-artifact@0bd50d53a6d7fb5cb921e607957e9cc12b4ce392 # v12
|
|
with:
|
|
name: vercel-preview
|
|
run_id: ${{ github.event.workflow_run.id }}
|
|
path: temp/vercel-preview
|
|
|
|
- name: Read preview metadata
|
|
id: meta
|
|
run: |
|
|
echo "url=$(cat temp/vercel-preview/url.txt)" >> "$GITHUB_OUTPUT"
|
|
echo "pr-number=$(cat temp/vercel-preview/number.txt)" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Write report
|
|
run: |
|
|
echo "**Website Preview:** ${{ steps.meta.outputs.url }}" > preview-report.md
|
|
|
|
- name: Post PR comment
|
|
uses: ./.github/actions/post-pr-report-comment
|
|
with:
|
|
pr-number: ${{ steps.meta.outputs.pr-number }}
|
|
report-file: ./preview-report.md
|
|
comment-marker: '<!-- VERCEL_WEBSITE_PREVIEW -->'
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|