Skip to content

Commit

Permalink
Adding docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kolloch committed Jan 2, 2024
1 parent b2e01eb commit b74ff19
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Deploy static content to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]
branches: [ "master", "feature/docs" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
6 changes: 3 additions & 3 deletions docs/flake-module.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{self, ...}: {
{ self, ... }: {
perSystem = { config, self', inputs', pkgs, system, ... }: {
packages.docs = pkgs.buildNpmPackage {
pname = "docs";
version = "0.1.0";

src =
src =
pkgs.nix-gitignore.gitignoreSource [
".vscode"
"README.md"
".gitignore"
"nix"
"flake.*"
]
./.;
./.;

buildInputs = [
pkgs.vips
Expand Down
3 changes: 2 additions & 1 deletion nix/pre-commit/flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
# lint shell scripts
shellcheck.enable = true;
# nix format
nixpkgs-fmt.enable = true;
# TODO: need to preformat things accordingly and potentially use another formatter
# nixpkgs-fmt.enable = true;
};
};
};
Expand Down
12 changes: 12 additions & 0 deletions run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,18 @@ nix build -L "${NIX_OPTIONS[@]}" "${NIX_TESTS_OPTIONS[@]}" -f ./tests.nix || {
exit 5
}

echo -e "\e[1m=== Building .#docs (= Generating GitHub Page resources)\e[0m" >&2
rm -rf target/nix-result*
nix build -L "${NIX_OPTIONS[@]}" "${NIX_TESTS_OPTIONS[@]}" .#docs || {
echo "==================" >&2
echo "cd $top" >&2
echo "nix build -L \\" >&2
echo " ${NIX_OPTIONS[*]} ${NIX_TESTS_OPTIONS[*]} \\" >&2
echo " .#docs"
echo "=> FAILED" >&2
exit 5
}

echo -e "\e[1m=== Checking for uncomitted changes\e[0m" >&2
if test -n "$(git status --porcelain)"; then
echo ""
Expand Down

0 comments on commit b74ff19

Please sign in to comment.