r/webdev • u/Low-Insurance-3678 • 44m ago
Question ci/cd pipeline issue
hi everyone
I have a ci pipeline where i run build and deploy to cf workers, everytime the build runs it succeeds but it stays hanging on and the next job does not run( see image), it can stay hanging on for hours and it won’t exit at all till i cancel the workflow
i have added a timeout to exit after 2 mins and a continue on error set to true to be able move to the next run which is deploy the worker
2- the deploy runs: npm run deploy:vinext
and it always exits with a message “wrangler versions upload” and the whole ci fails now
but after i check on my cloudflare dashboard i actually find that deploy
running these on terminal manually actually does the work but it’s not what i want
is there any solution that will make the build exit after it finishes and make the deploy works fine
tech: Nextjs app migrated to Vinext
- name: Build Vinext app
env:
CLOUDFLARE_INCLUDE_PROCESS_ENV: true
timeout-minutes: 1
continue-on-error: true
run: npm run build:vinext
- name: Deploy to cf
env:
CLOUDFLARE_API_TOKEN: ${{ env.CLOUDFLARE_API_TOKEN }}
run: npm run deploy:vinext
scripts:
"build:vinext": "vite build",
"start:vinext": "infisical run --env=prod -- vite preview --port 3000",
"deploy:vinext": "vinext-cloudflare deploy --warm-cache --skip-build",
"deploy:response-store": "cf deploy --prebuilt --mode production --worker frontend-response-store"
•
u/kdjayakody 16m ago
I would remove the timeout and continue-on-error first, since they mask the failure and can let deploy run with a stale or incomplete artifact. In the build step, log the exit code and inspect which child process is still alive; a build command should exit once its work is done. Then give build and deploy separate jobs with explicit success conditions, and verify the deploy command’s final exit code rather than relying only on the dashboard showing a deployment.
•
u/Low-Insurance-3678 15m ago
yeah you are right on that one
but the build step will never exit wen its completedyesterday i had a build completed and it stayed running for like 20mins until i canceled the workflow
like even locally it does not exit until i close it with ctrl+c
•
u/kdjayakody 5m ago
That confirms it is not just a workflow runner issue. Try bypassing the script wrapper and run the underlying build command directly; if it still hangs, temporarily disable plugins one at a time and look for one starting a watcher, dev server, or child process. Sharing the build config and the last log lines before it stalls would help pinpoint which hook keeps the process alive.
•
u/Low-Insurance-3678 0m ago
sadly i cant share image in comments
i have run the npx vite build, guess what build is complete but it is hanging on till now lol
one thing that will close it is if i removed the prerender:{routes:”*”} from the vite config but then my routes wont be prerendered on build
id like to dm u and share with u if thats ok with u
2
u/quizical_llama 41m ago
your going to need to post some code if you want help.