diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8037065..43ff814 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,11 +19,11 @@ jobs: - name: Build Website run: | - nix-shell --run 'ikiwiki --setup ikiwiki.setup' + nix-build - name: Upload to Remote Server run: | mkdir -p ~/.ssh echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa - rsync -av --delete -e www/ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/srv/http/wesl.ee/ + rsync -av --delete -e result/ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/srv/http/wesl.ee/ diff --git a/default.nix b/default.nix index cca27cf..9db60a0 100644 --- a/default.nix +++ b/default.nix @@ -14,12 +14,17 @@ let TextVimColor = perl536Packages.buildPerlPackage { license = with lib.licenses; [ artistic1 gpl1Plus ]; }; }; -in pkgs.mkShell rec { +in pkgs.stdenv.mkDerivation rec { + pname = "personal-wiki"; + version = "0.1.0"; + src = builtins.path { name = "personal-wiki"; path = ./.; }; + buildInputs = with pkgs; [ ikiwiki vim graphviz + git # teximg imagemagick @@ -37,4 +42,12 @@ in pkgs.mkShell rec { perl536Packages.SortNaturally TextVimColor ]; + + buildPhase = '' + ikiwiki --gettime --setup ./ikiwiki.setup -v + ''; + + installPhase = '' + mv www $out + ''; }