Closed chbg closed 1 month ago
@chbg is attempting to deploy a commit to the 47ng Team on Vercel.
A member of the Team first needs to authorize it.
pnpm add https://pkg.pr.new/nuqs@659
commit:
f5d11c6
Damn, something's wrong then 😅
pnpm add https://pkg.pr.new/nuqs@659
commit:
f5d11c6
Damn, something's wrong then 😅
Oops, I see what I did. Fixing...
This might help: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/passing-information-between-jobs
Also, the if check on the deployment job should use a == to make sure only a valid value enables it (skip != 'true'
will trigger on an empty value). Might need to inverse the logic name (enable rather than skip), to make it clearer.
This might help: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/passing-information-between-jobs
Also, the if check on the deployment job should use a == to make sure only a valid value enables it (
skip != 'true'
will trigger on an empty value). Might need to inverse the logic name (enable rather than skip), to make it clearer.
I will check that article out shortly. Also, thanks for the input on the deployment job. Stepping away for a little, but will work to resolve this today!
@franky47 , I think I did it? Can you check this commit out?
@franky47 , new commit ready for review.
The overall split looks better, but now we need to fix the passing of the
enable
flag between the two jobs, by setting a job-level output in the check job, and consuming it in the deploy job.Docs showcasing this: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/passing-information-between-jobs#example-defining-outputs-for-a-job
- Add back an ID for the step doing the Git check (so we can use it to map the step output to a job output)
- Declare and connect a job output for the check job
- Re-connect the two jobs with
need
(see suggestion)- Update the if clause for the deploy job to use the job-level output we defined earlier
Ok, great. I will work on getting these in place in the next 12 - 24 hours.
@franky47 , I think this should do it. I've also updated the original PR description to reflect the changes made to date vs. the original file.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
nuqs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Oct 1, 2024 7:56am |
I also have added a way to trigger this on labelled PRs, to bypass the approval mechanism (sometimes it might be handy). Thanks for your help!
:tada: This PR is included in version 1.20.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Overview
This pull request refactors the CI workflow by splitting the process into two jobs: one for detecting changes in the nuqs package and another for deployment. The deployment now only runs when changes are detected, optimizing the CI pipeline and preventing unnecessary builds. Workflow logic was improved based on feedback to ensure proper communication between jobs.
Changes Made
check-changes
job, allowing us to map the step output (enable
flag) to a job-level output.enable
output at the job level for thecheck-changes
job, ensuring proper communication between jobs.deploy-preview
job to depend on the output of thecheck-changes
job using the needs keyword. The deployment job now only runs when changes are detected, based on theenable
flag.if
clause in thedeploy-preview
job to use the job-level output (enable
).Benefits
check-changes
anddeploy-preview
jobs, improving maintainability.