Skip to content

Commit

Permalink
build: fix config issue and update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
nyadiia committed Jul 25, 2024
1 parent 301a262 commit 614d677
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 19 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ jobs:
site:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: nixbuild/nix-quick-install-action@v5
with:
nix_version: 2.4pre20201205_a5d85d0
nix_conf: experimental-features = nix-command flakes
- name: nix build
- uses: actions/checkout@v3
- name: Check Nix flake inputs
uses: DeterminateSystems/flake-checker-action@v4 # This action
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v3
- name: Build site
run: nix build -L .#site
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
base_url = "https://acm.umn.edu/"
build_search_index = false
compile_sass = true
generate_feed = true
generate_feeds = true
feed_filename = "rss.xml"
highlight_code = true
title = "ACM UMN"
Expand Down
30 changes: 24 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 18 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,30 @@
utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, utils }:
utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system};
in {
outputs =
{
self,
nixpkgs,
utils,
}:
utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
devShell = pkgs.mkShell { buildInputs = with pkgs; [ zola ]; };
packages.site = pkgs.stdenv.mkDerivation {
name = "site";
src = pkgs.nix-gitignore.gitignoreSource [ ] ./.;

buildInputs = with pkgs; [ zola ];
phases = [ "unpackPhase" "buildPhase" ];
phases = [
"unpackPhase"
"buildPhase"
];
buildPhase = "zola build -o $out";
};
});
}
);
}

0 comments on commit 614d677

Please sign in to comment.