Skip to content

Commit

Permalink
update deps & add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kristoff-it committed Jul 21, 2024
1 parent dbfe40f commit ebe7eb0
Show file tree
Hide file tree
Showing 18 changed files with 271 additions and 58 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: CI
on: push
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Change if you need git info

- name: Setup Zig
uses: mlugg/setup-zig@v1
with:
version: 0.13.0

- name: Build
run: zig build

18 changes: 9 additions & 9 deletions build.zig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const std = @import("std");
const templating = @import("zine/templating.zig");
const content = @import("zine/content.zig");
const templating = @import("templating.zig");
const content = @import("content.zig");

pub const AddWebsiteOptions = union(enum) {
multilingual: MultilingualSite,
Expand Down Expand Up @@ -172,7 +172,7 @@ pub fn build(b: *std.Build) !void {

const server = b.addExecutable(.{
.name = "server",
.root_source_file = b.path("zine/server/main.zig"),
.root_source_file = b.path("server/main.zig"),
.target = target,
.optimize = optimize,
});
Expand All @@ -192,23 +192,23 @@ pub fn build(b: *std.Build) !void {

const layout = b.addExecutable(.{
.name = "layout",
.root_source_file = b.path("zine/src/layout.zig"),
.root_source_file = b.path("src/layout.zig"),
.target = target,
.optimize = optimize,
// .strip = true,

});

// dummy comment
const super = b.dependency("super", mode);
const scripty = super.builder.dependency("scripty", mode);
const super = b.dependency("superhtml", mode);
const scripty = super.builder.dependency("scripty", .{});
const ziggy = b.dependency("ziggy", mode);
const zeit = b.dependency("zeit", mode);
const syntax = b.dependency("flow-syntax", mode);
const ts = syntax.builder.dependency("tree-sitter", mode);

layout.root_module.addImport("options", options);
layout.root_module.addImport("super", super.module("super"));
layout.root_module.addImport("superhtml", super.module("superhtml"));
layout.root_module.addImport("scripty", scripty.module("scripty"));
layout.root_module.addImport("ziggy", ziggy.module("ziggy"));
layout.root_module.addImport("zeit", zeit.module("zeit"));
Expand All @@ -221,7 +221,7 @@ pub fn build(b: *std.Build) !void {

const docgen = b.addExecutable(.{
.name = "docgen",
.root_source_file = b.path("zine/src/docgen.zig"),
.root_source_file = b.path("src/docgen.zig"),
.target = target,
.optimize = .Debug,
});
Expand All @@ -231,7 +231,7 @@ pub fn build(b: *std.Build) !void {

const md_renderer = b.addExecutable(.{
.name = "markdown-renderer",
.root_source_file = b.path("zine/src/markdown-renderer.zig"),
.root_source_file = b.path("src/markdown-renderer.zig"),
.target = b.resolveTargetQuery(.{}),
.optimize = optimize,
});
Expand Down
6 changes: 3 additions & 3 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
.frontmatter = .{
.path = "frontmatter",
},
.super = .{
.url = "git+https://github.com/kristoff-it/super-html.git#523677da79be7f1c8b76fb8d2a282f93d676a299",
.hash = "12203c07d8dff12d6409bb6656a0e70745b182811dea56d9ae0d2f5b86b115baa8d5",
.superhtml = .{
.url = "git+https://github.com/kristoff-it/superhtml#497764c5c3704a79f5f360ffa5e28daf971e7735",
.hash = "12208df6c257831c49cc296c9efe42b0eeea6cd9d83c1a78aeba3d76eb9193b3110b",
},
.ziggy = .{
.url = "git+https://github.com/MFAshby/ziggy.git#2f34b58ca2c5e72c7dbd3ad3756df537d03d79e0",
Expand Down
2 changes: 1 addition & 1 deletion zine/content.zig → content.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const std = @import("std");
const ziggy = @import("ziggy");
const templating = @import("templating.zig");
const contexts = @import("src/contexts.zig");
const zine = @import("../build.zig");
const zine = @import("build.zig");

const FrontParser = ziggy.frontmatter.Parser(contexts.Page);
const TranslationIndex = std.StringArrayHashMap(TranslationIndexEntry);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit ebe7eb0

Please sign in to comment.