feat: enhance Vercel deployment process with framework detection and source file handling
- Implemented a function to detect project frameworks based on package.json and configuration files. - Added support for including source files in the deployment request for frameworks that require building. - Updated the action function to handle framework detection and adjust deployment configuration accordingly. - Removed unnecessary console logs and improved error handling for file reading operations.
This commit is contained in:
@@ -435,18 +435,15 @@ export class ActionRunner {
|
||||
try {
|
||||
await webcontainer.fs.readdir(dirPath);
|
||||
buildDir = dirPath;
|
||||
logger.debug(`Found build directory: ${buildDir}`);
|
||||
break;
|
||||
} catch (error) {
|
||||
// Directory doesn't exist, try the next one
|
||||
logger.debug(`Build directory ${dir} not found, trying next option. ${error}`);
|
||||
} catch {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// If no build directory was found, use the default (dist)
|
||||
if (!buildDir) {
|
||||
buildDir = nodePath.join(webcontainer.workdir, 'dist');
|
||||
logger.debug(`No build directory found, defaulting to: ${buildDir}`);
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user