Skip to content

Commit a5e4f16

Browse files
committed
Fix: Run pkg.pr.new only if there are changes
1 parent 8cbae4f commit a5e4f16

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Diff for: .github/workflows/pkg.pr.new.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
15+
- name: Check for changes to nuqs package
16+
run: |
17+
if git diff --quiet HEAD^ HEAD ./packages/nuqs; then
18+
echo "No changes to nuqs package, skipping preview deployment."
19+
exit 0
20+
fi
1521
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2
1622
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
1723
with:
@@ -25,4 +31,4 @@ jobs:
2531
run: pnpm pkg set version=0.0.0-preview.${{ github.event.pull_request.head.sha }}
2632
working-directory: packages/nuqs
2733
- name: Publish to pkg.pr.new
28-
run: pnpx pkg-pr-new publish --compact './packages/nuqs'
34+
run: pnpx pkg-pr-new publish --compact './packages/nuqs'

0 commit comments

Comments
 (0)