@@ -171,27 +171,8 @@ jobs:
171171
172172 - name : Start ComfyUI server
173173 run : |
174- echo "Starting ComfyUI server..."
175174 python main.py --cpu --multi-user --front-end-root ../ComfyUI_frontend/dist &
176- SERVER_PID=$!
177- echo "Server PID: $SERVER_PID"
178-
179- # Enhanced wait with progress feedback
180- echo "Waiting for server to start (timeout: 600 seconds)..."
181175 wait-for-it --service 127.0.0.1:8188 -t 600
182-
183- if [ $? -eq 0 ]; then
184- echo "✅ ComfyUI server ready"
185- else
186- echo "❌ Server startup timeout or failure"
187- echo "Checking server process..."
188- if ps -p $SERVER_PID > /dev/null; then
189- echo "Server process is still running (PID: $SERVER_PID)"
190- else
191- echo "Server process has exited"
192- fi
193- exit 1
194- fi
195176 working-directory : ComfyUI
196177
197178 - name : Cache Playwright browsers
@@ -232,17 +213,15 @@ jobs:
232213 MAX_RETRIES=3
233214 SUCCESS=false
234215
235- echo "Deploying to Cloudflare Pages (branch: ${{ steps.project-name.outputs.branch }})..."
236-
237216 while [ $RETRY_COUNT -lt $MAX_RETRIES ] && [ $SUCCESS = false ]; do
238217 RETRY_COUNT=$((RETRY_COUNT + 1))
239218 echo "Deployment attempt $RETRY_COUNT of $MAX_RETRIES..."
240219
241220 if npx wrangler pages deploy ComfyUI_frontend/playwright-report --project-name=${{ steps.project-name.outputs.name }} --branch=${{ steps.project-name.outputs.branch }}; then
242221 SUCCESS=true
243- echo "✅ Deployment successful on attempt $RETRY_COUNT"
222+ echo "Deployment successful on attempt $RETRY_COUNT"
244223 else
245- echo "❌ Deployment failed on attempt $RETRY_COUNT"
224+ echo "Deployment failed on attempt $RETRY_COUNT"
246225 if [ $RETRY_COUNT -lt $MAX_RETRIES ]; then
247226 echo "Retrying in 10 seconds..."
248227 sleep 10
@@ -258,16 +237,6 @@ jobs:
258237 CLOUDFLARE_API_TOKEN : ${{ secrets.CLOUDFLARE_API_TOKEN }}
259238 CLOUDFLARE_ACCOUNT_ID : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
260239
261- - name : Skip Cloudflare deployment for forks
262- id : skip-deployment
263- if : always() && github.event.pull_request.head.repo.full_name != github.repository
264- run : |
265- echo "⚠️ Skipping Cloudflare Pages deployment for forked PR in this workflow"
266- echo "✅ The pull_request_target deployment workflow will handle deployment with secrets access"
267- echo "📋 The Playwright report is available as a workflow artifact"
268- echo "🚀 pull_request_target workflow will deploy to: https://${{ steps.project-name.outputs.branch }}.${{ steps.project-name.outputs.name }}.pages.dev"
269- echo "deployment-url=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> $GITHUB_OUTPUT
270-
271240 - name : Save deployment info for summary
272241 if : always()
273242 run : |
@@ -279,11 +248,9 @@ jobs:
279248 EXIT_CODE="1"
280249 fi
281250
282- # Determine deployment URL based on whether it was deployed or skipped
251+ # Determine deployment URL
283252 if [ "${{ steps.cloudflare-deploy.conclusion }}" = "success" ]; then
284253 DEPLOYMENT_URL="${{ steps.cloudflare-deploy.outputs.deployment-url || steps.cloudflare-deploy.outputs.url || format('https://{0}.{1}.pages.dev', steps.project-name.outputs.branch, steps.project-name.outputs.name) }}"
285- elif [ "${{ steps.skip-deployment.conclusion }}" = "success" ]; then
286- DEPLOYMENT_URL="${{ steps.skip-deployment.outputs.deployment-url }}"
287254 else
288255 # Fallback for unexpected cases
289256 DEPLOYMENT_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
@@ -316,49 +283,11 @@ jobs:
316283 body : |
317284 ${{ steps.playwright.conclusion == 'success' && '✅' || '❌' }} **${{ matrix.browser }}**: ${{ steps.playwright.conclusion == 'success' && 'Tests passed!' || 'Tests failed!' }} [View Report](${{
318285 steps.cloudflare-deploy.conclusion == 'success' && (steps.cloudflare-deploy.outputs.deployment-url || format('https://{0}.{1}.pages.dev', steps.project-name.outputs.branch, steps.project-name.outputs.name)) ||
319- steps.skip-deployment.outputs.deployment-url ||
320286 format('https://github.com/{0}/actions/runs/{1}', github.repository, github.run_id)
321287 }})
322288
323- trigger-deployment :
324- needs : playwright-tests
325- runs-on : ubuntu-latest
326- if : always() && github.event_name == 'pull_request'
327- permissions :
328- contents : read
329- steps :
330- - name : Trigger deployment workflow for cost optimization
331- uses : actions/github-script@v7
332- with :
333- script : |
334- const { owner, repo } = context.repo;
335- const prNumber = context.payload.pull_request.number;
336- const runId = context.runId;
337- const branchName = context.payload.pull_request.head.ref;
338-
339- console.log(`Triggering deployment workflow for PR #${prNumber}`);
340- console.log(`Run ID: ${runId}, Branch: ${branchName}`);
341-
342- try {
343- await github.rest.repos.createDispatchEvent({
344- owner,
345- repo,
346- event_type: 'playwright-tests-completed',
347- client_payload: {
348- run_id: runId.toString(),
349- pr_number: prNumber,
350- branch_name: branchName,
351- trigger_source: 'cost-optimized-webhook'
352- }
353- });
354- console.log('✅ Successfully triggered deployment workflow via webhook');
355- } catch (error) {
356- console.error('❌ Failed to trigger deployment workflow:', error);
357- // Don't fail the job if dispatch fails
358- }
359-
360289 comment-summary :
361- needs : [ playwright-tests, trigger-deployment]
290+ needs : playwright-tests
362291 runs-on : ubuntu-latest
363292 if : always() && github.event_name == 'pull_request'
364293 permissions :
0 commit comments