mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-22 05:37:56 +00:00
Fix: handle missing SDK docs in CI build
This commit is contained in:
@@ -138,8 +138,15 @@ function main() {
|
|||||||
|
|
||||||
// 4. Copy main Markdown/RS files from Pezkuwi-SDK/docs to public/docs
|
// 4. Copy main Markdown/RS files from Pezkuwi-SDK/docs to public/docs
|
||||||
console.log('\n--- Step 4: Copying Main Documentation Files ---');
|
console.log('\n--- Step 4: Copying Main Documentation Files ---');
|
||||||
copyRecursive(mainDocsSourcePath, publicDocsPath);
|
if (fs.existsSync(mainDocsSourcePath)) {
|
||||||
console.log('✅ Main documentation files copied successfully.');
|
copyRecursive(mainDocsSourcePath, publicDocsPath);
|
||||||
|
console.log('✅ Main documentation files copied successfully.');
|
||||||
|
} else {
|
||||||
|
console.warn(`⚠️ Warning: SDK docs source not found at ${mainDocsSourcePath}. Skipping docs copy.`);
|
||||||
|
console.warn(' This is expected in CI environments without Pezkuwi-SDK.');
|
||||||
|
// Create empty docs directory to prevent build errors
|
||||||
|
fs.mkdirSync(publicDocsPath, { recursive: true });
|
||||||
|
}
|
||||||
|
|
||||||
// 5. Copy the BUILT and Rebranded Rustdoc site (if built successfully)
|
// 5. Copy the BUILT and Rebranded Rustdoc site (if built successfully)
|
||||||
if (rustdocBuiltSuccessfully && fs.existsSync(rustdocBuildOutputPath)) {
|
if (rustdocBuiltSuccessfully && fs.existsSync(rustdocBuildOutputPath)) {
|
||||||
@@ -153,7 +160,7 @@ function main() {
|
|||||||
|
|
||||||
// 6. Generate the final navigation structure
|
// 6. Generate the final navigation structure
|
||||||
console.log('\n--- Step 6: Generating Navigation Structure ---');
|
console.log('\n--- Step 6: Generating Navigation Structure ---');
|
||||||
const rawStructure = generateRecursiveStructure(mainDocsSourcePath);
|
const rawStructure = fs.existsSync(mainDocsSourcePath) ? generateRecursiveStructure(mainDocsSourcePath) : {};
|
||||||
|
|
||||||
const finalStructure = {};
|
const finalStructure = {};
|
||||||
const generalDocs = {};
|
const generalDocs = {};
|
||||||
|
|||||||
Reference in New Issue
Block a user