Skip to content

Commit 1c9f476

Browse files
committed
fix: improve CI workflow artifact handling
- Add debug output to check build artifacts - Make artifact upload conditional with warning for missing files - Add error handling for artifact download in cache-build job - Make caching conditional based on successful artifact download
1 parent 2995cf1 commit 1c9f476

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,23 +89,45 @@ jobs:
8989
- run: pnpm turbo run type-check --affected
9090
- run: pnpm turbo run build --affected
9191
- run: pnpm turbo run test --affected
92+
93+
# Debug: Check what was built
94+
- name: Check build output
95+
run: |
96+
echo "Checking packages directory structure:"
97+
find packages -name "dist" -type d || echo "No dist directories found"
98+
ls -la packages/*/dist 2>/dev/null || echo "No dist directories to list"
9299
93100
- uses: actions/upload-artifact@v4
101+
if: success()
94102
with:
95103
name: build-artifacts
96104
path: packages/*/dist
105+
if-no-files-found: warn
97106

98107
cache-build:
99108
name: Cache Artifacts
100109
needs: validate
101110
runs-on: ubuntu-latest
111+
if: success()
102112
steps:
103113
- uses: actions/download-artifact@v4
114+
id: download-artifacts
115+
continue-on-error: true
104116
with:
105117
name: build-artifacts
106118
path: packages
107119

120+
- name: Check artifact download
121+
run: |
122+
if [[ "${{ steps.download-artifacts.outcome }}" == "success" ]]; then
123+
echo "Artifacts downloaded successfully"
124+
ls -la packages/
125+
else
126+
echo "No artifacts to download - this may be expected if no packages were built"
127+
fi
128+
108129
- uses: actions/cache@v4
130+
if: steps.download-artifacts.outcome == 'success'
109131
with:
110132
path: packages/*/dist
111133
key: build-artifacts-${{ github.sha }}

0 commit comments

Comments
 (0)