Skip to content

Commit 69c0c82

Browse files
committed
Add explicit error handling for SAM build artifacts
- Add verification step to check .aws-sam directory exists after build - Add if-no-files-found: error to fail explicitly if artifacts are missing
1 parent f702f22 commit 69c0c82

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/backend.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,17 @@ jobs:
3535
- name: Build
3636
working-directory: backend
3737
run: npm run build
38+
- name: Verify build output
39+
run: |
40+
echo "Checking for .aws-sam directory..."
41+
ls -la backend/
42+
ls -la backend/.aws-sam/ || echo "ERROR: .aws-sam directory not found!"
3843
- name: Store artifacts
3944
uses: actions/upload-artifact@v4
4045
with:
4146
name: sam-build
4247
path: backend/.aws-sam
48+
if-no-files-found: error
4349

4450
deploy:
4551
needs: build

0 commit comments

Comments
 (0)