From 571f196363919c6b5dcc0c7017c432cfdfa4dc31 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Mon, 25 Jan 2021 17:24:03 -0300 Subject: Use "make public" as the primary way of building the site --- Makefile | 2 +- _config.yml | 1 + build-aux/assert-spelling.sh | 1 + default.nix | 10 ++++++---- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 6a1d1b2..8d910e3 100644 --- a/Makefile +++ b/Makefile @@ -17,5 +17,5 @@ OUT = public .PHONY: public public: - jekyll build -d $(OUT) --trace + JEKYLL_ENV=production jekyll build -d $(OUT) --trace sh build-aux/workflow/TODOs.sh $(NAME_UC) $(NAME) $(MAILING_LIST) diff --git a/_config.yml b/_config.yml index c11516c..d58209e 100644 --- a/_config.yml +++ b/_config.yml @@ -43,6 +43,7 @@ exclude: - locale/ - resources/podcasts/*.checksum - resources/screencasts/*.checksum + - public/ collections: articles: diff --git a/build-aux/assert-spelling.sh b/build-aux/assert-spelling.sh index 0503a4b..33da3e3 100755 --- a/build-aux/assert-spelling.sh +++ b/build-aux/assert-spelling.sh @@ -2,6 +2,7 @@ set -eu export LANG=C.UTF-8 +export JEKYLL_ENV=production for DICT in build-aux/spelling/*.txt; do sort "$DICT" | diff - "$DICT" || { diff --git a/default.nix b/default.nix index 2655a59..76994ac 100644 --- a/default.nix +++ b/default.nix @@ -4,6 +4,7 @@ let src = pkgs.nix-gitignore.gitignoreSourcePure [ "/result*" "/_site/" + "/public/" "/.jekyll-cache/" ] ./.; utils-i18n = pkgs.callPackage ./nix/utils-i18n.nix { }; @@ -36,6 +37,8 @@ let inkscape imagemagick + pandoc + gettext perl graphviz nixfmt @@ -54,11 +57,10 @@ let }; in rec { site = drv "site" '' - export JEKYLL_ENV=production - jekyll build -d $out --trace + make public + mv public $out ''; test = drv "test" '' - export JEKYLL_ENV=production make check touch $out ''; @@ -86,7 +88,7 @@ in rec { }; publishScript = pkgs.writeShellScriptBin "publish.sh" '' set -eux - SERVER_URL='root@euandre.org' + SERVER_URL='euandre.org' REMOTE_PATH='/home/user-data/www/default/' OUT_DOCS='${site}' ${pkgs.openssh}/bin/ssh "$SERVER_URL" rm -rf "$REMOTE_PATH/*" -- cgit v1.2.3