const std = @import("std"); const webgen = @import("webgen"); pub fn build(b: *std.Build) void { const run_webgen = webgen.installHtmlStep(b); run_webgen.addDirectoryArg(b.path("src")); const bundle_html = b.addSystemCommand(&[_][]const u8{ "tar", "--exclude=pages.tar.gz", "-czvf", "html-out/pages.tar.gz", "html-out" }); bundle_html.step.dependOn(&run_webgen.step); b.getInstallStep().dependOn(&bundle_html.step); const serve = b.addSystemCommand(&[_][]const u8{ "lighttpd", "-Df", "util/lighttpd.conf" }); const run_server = b.step("serve", "Run a local test server"); serve.step.dependOn(b.getInstallStep()); run_server.dependOn(&serve.step); const publish_to_prod = b.step("publish", "Publish the website to production"); publish_to_prod.dependOn(b.getInstallStep()); }