mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-26 15:07:39 +00:00
fix: Add CI-specific build script to skip native executable build
The Node.js CI build was failing because it tried to build the native executable which requires postject and other tools that may not be available in all CI environments. Created a separate build:ci script that skips the native build step for CI.
This commit is contained in:
parent
324630ea17
commit
163e1b6f03
3 changed files with 33 additions and 1 deletions
2
.github/workflows/node.yml
vendored
2
.github/workflows/node.yml
vendored
|
|
@ -109,7 +109,7 @@ jobs:
|
|||
|
||||
- name: Build frontend and backend
|
||||
working-directory: web
|
||||
run: npm run build
|
||||
run: npm run build:ci
|
||||
|
||||
- name: Run tests
|
||||
working-directory: web
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
"dev": "node scripts/dev.js",
|
||||
"dev:client": "node scripts/dev.js --client-only",
|
||||
"build": "node scripts/build.js",
|
||||
"build:ci": "node scripts/build-ci.js",
|
||||
"lint": "eslint 'src/**/*.{ts,tsx}'",
|
||||
"lint:fix": "eslint 'src/**/*.{ts,tsx}' --fix",
|
||||
"typecheck": "tsc --noEmit",
|
||||
|
|
|
|||
31
web/scripts/build-ci.js
Normal file
31
web/scripts/build-ci.js
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
const { execSync } = require('child_process');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
console.log('Starting CI build process...');
|
||||
|
||||
// Ensure directories exist
|
||||
console.log('Creating directories...');
|
||||
execSync('node scripts/ensure-dirs.js', { stdio: 'inherit' });
|
||||
|
||||
// Copy assets
|
||||
console.log('Copying assets...');
|
||||
execSync('node scripts/copy-assets.js', { stdio: 'inherit' });
|
||||
|
||||
// Build CSS
|
||||
console.log('Building CSS...');
|
||||
execSync('npx tailwindcss -i ./src/client/styles.css -o ./public/bundle/styles.css --minify', { stdio: 'inherit' });
|
||||
|
||||
// Bundle client JavaScript
|
||||
console.log('Bundling client JavaScript...');
|
||||
execSync('esbuild src/client/app-entry.ts --bundle --outfile=public/bundle/client-bundle.js --format=esm --minify', { stdio: 'inherit' });
|
||||
execSync('esbuild src/client/test-terminals-entry.ts --bundle --outfile=public/bundle/terminal.js --format=esm --minify', { stdio: 'inherit' });
|
||||
|
||||
// Build server TypeScript
|
||||
console.log('Building server...');
|
||||
execSync('tsc', { stdio: 'inherit' });
|
||||
|
||||
// Skip native executable build in CI
|
||||
console.log('Skipping native executable build in CI environment...');
|
||||
|
||||
console.log('CI build completed successfully!');
|
||||
Loading…
Reference in a new issue