Skip to content

Commit ff10bdd

Browse files
fix: add clean build step and improve error handling
- Add clean build step before frontend build to prevent caching issues - Improve error handling in CI workflows with explicit exit codes - Ensure dist directory verification fails fast if not found - Add proper error messages for debugging CI issues
1 parent 211eed6 commit ff10bdd

3 files changed

Lines changed: 17 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,18 +128,21 @@ jobs:
128128
run: npm ci
129129
working-directory: web
130130

131+
- name: Clean previous build
132+
run: rm -rf dist
133+
131134
- name: Build frontend
132135
run: |
133136
echo "Building frontend..."
134137
npm run build
135138
echo "Frontend build completed"
136-
ls -la dist || echo "dist directory not found in workspace root"
139+
ls -la dist || (echo "dist directory not found in workspace root" && exit 1)
137140
working-directory: web
138141

139142
- name: Verify frontend dist exists
140143
run: |
141144
echo "Checking for dist directory in workspace root..."
142-
ls -la ../dist || echo "dist directory not found in workspace root"
145+
ls -la dist || (echo "dist directory not found in workspace root" && exit 1)
143146
144147
- name: Build Tauri app
145148
uses: tauri-apps/tauri-action@v0

.github/workflows/release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,22 @@ jobs:
6464
run: npm ci
6565
working-directory: web
6666

67+
- name: Clean previous build
68+
run: rm -rf dist
69+
6770
- name: Build frontend
6871
run: |
6972
echo "Building frontend..."
7073
npm run build
7174
echo "Frontend build completed"
72-
ls -la dist || echo "dist directory not found in workspace root"
75+
ls -la dist || (echo "dist directory not found in workspace root" && exit 1)
7376
working-directory: web
7477

78+
- name: Verify frontend dist exists
79+
run: |
80+
echo "Checking for dist directory in workspace root..."
81+
ls -la dist || (echo "dist directory not found in workspace root" && exit 1)
82+
7583
- name: Build application
7684
uses: tauri-apps/tauri-action@v0
7785
env:

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)