Skip to content

Commit 1eb1c0d

Browse files
committed
ci(preview): Fix if condition to allow workflow_dispatch event
1 parent 5a2ef22 commit 1eb1c0d

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

.github/workflows/cr_preview.yml

+1-14
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
name: pkg.pr.new
1717
runs-on: macos-latest
1818
timeout-minutes: 5
19-
if: github.event_name == 'pull_request'
19+
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
2020
steps:
2121
# https://github.com/actions/checkout
2222
- uses: actions/checkout@v4
@@ -35,17 +35,6 @@ jobs:
3535
cache: pnpm
3636
node-version-file: ".node-version"
3737

38-
# https://github.com/tj-actions/changed-files
39-
- name: Run changed-files
40-
id: changed-files
41-
uses: tj-actions/changed-files@v45
42-
with:
43-
separator: " "
44-
dir_names: "true"
45-
dir_names_max_depth: "2" # truncates the path to packages/package-name
46-
files: |
47-
pkgs/**
48-
4938
# https://pnpm.io/cli/install
5039
- name: Install Node.js dependencies with pnpm
5140
run: >
@@ -55,5 +44,3 @@ jobs:
5544
- name: Publish packages preview with pkg-pr-new CLI
5645
run: pnpx pkg-pr-new publish --pnpm './pkgs/*' --packageManager=pnpm
5746
if: ${{ steps.changed-files.outputs.all_changed_files_count > 0 }}
58-
env:
59-
CHANGED_DIRS: ${{ steps.changed-files.outputs.all_changed_files }}

0 commit comments

Comments
 (0)