fix build warnings
Build and Deploy to K3s / lint (push) Has been cancelled
Build and Deploy to K3s / build-and-push (push) Has been cancelled
Build and Deploy to K3s / deploy (push) Has been cancelled
Build and Deploy to K3s / test (push) Has been cancelled

This commit is contained in:
jasonwitty
2026-08-23 23:50:04 -07:00
parent f630a44a5d
commit e6d1e170fd
+11 -4
View File
@@ -2,6 +2,8 @@ use std::path::Path;
use std::process::Command;
fn main() {
let is_ci = std::env::var("CI").is_ok();
// Verify that required directories exist at build time
let required_dirs = vec!["static", "templates", "node_modules"];
@@ -18,10 +20,13 @@ fn main() {
for dir in &missing_dirs {
println!("cargo:warning= - {}", dir);
}
if missing_dirs.contains(&"node_modules") {
println!("cargo:warning=Run 'npm install' to install frontend dependencies");
}
// node_modules is only needed for local dev (Docker/CI install deps separately)
if !is_ci && !Path::new("node_modules").exists() {
println!(
"cargo:warning=node_modules not found — run 'npm install' for frontend dependencies"
);
}
// Verify critical files
@@ -47,8 +52,10 @@ fn main() {
}
}
// Build mdBook documentation
// Build mdBook documentation (skip in CI — docs are built in Docker)
if !is_ci {
build_documentation();
}
// Tell cargo to rerun if these directories change
println!("cargo:rerun-if-changed=static/");