Skip to content

Commit cf30a31

Browse files
authored
Modify build process to exclude certain workspaces (#1188)
Updated the build process to skip excluded workspaces during the build of changed workspaces.
1 parent e0291a0 commit cf30a31

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/playwright.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,20 +88,28 @@ jobs:
8888
- name: Install Playwright Browsers
8989
if: steps.playwright-cache.outputs.cache-hit != 'true'
9090
run: npx playwright install --with-deps
91+
92+
9193

9294
- name: Build Changed Workspaces
95+
env:
96+
STEPS_GET_WORKSPACES_OUTPUTS_CHANGED_WORKSPACES: ${{ steps.get_workspaces.outputs.changed_workspaces }}
97+
# Projects to exclude:
98+
EXCLUDED_SAMPLES: "react-ui-kit-search-nearby react-ui-kit-search-text"
9399
run: |
94-
IFS=$'\n'
95-
CHANGED_WORKSPACES_ARRAY=(${STEPS_GET_WORKSPACES_OUTPUTS_CHANGED_WORKSPACES})
100+
IFS=$'\n' CHANGED_WORKSPACES_ARRAY=(${STEPS_GET_WORKSPACES_OUTPUTS_CHANGED_WORKSPACES})
96101
echo "Changed Workspaces Array: ${CHANGED_WORKSPACES_ARRAY[@]}"
97-
98102
echo "Building changed workspaces:"
99103
for workspace in "${CHANGED_WORKSPACES_ARRAY[@]}"; do
100-
echo " - samples/$workspace"
104+
# Check if the current workspace is in the excluded list
105+
if [[ " $EXCLUDED_SAMPLES " == *" $workspace "* ]]; then
106+
echo " - Skipping excluded workspace: samples/$workspace"
107+
continue
108+
fi
109+
110+
echo " - samples/$workspace"
101111
npm run build --workspace=samples/$workspace
102112
done
103-
env:
104-
STEPS_GET_WORKSPACES_OUTPUTS_CHANGED_WORKSPACES: ${{ steps.get_workspaces.outputs.changed_workspaces }}
105113
106114
- name: Generate Index (Run Once After Builds)
107115
run: bash samples/generate-index.sh

0 commit comments

Comments
 (0)