deployerbot: push after a successful deploy

This commit is contained in:
Motiejus Jakštys 2023-07-30 08:53:19 +03:00
parent 482f01bb01
commit afd7743f37

View File

@ -58,14 +58,17 @@
OLD_PATH=$PATH OLD_PATH=$PATH
export PATH=$PATH:${pkgs.git}/bin export PATH=$PATH:${pkgs.git}/bin
${pkgs.nix}/bin/nix flake update --accept-flake-config --commit-lock-file ${pkgs.nix}/bin/nix flake update --accept-flake-config --commit-lock-file
${pkgs.git}/bin/git push origin main
export PATH=$OLD_PATH export PATH=$OLD_PATH
OLD_PATH=$PATH
export PATH=$PATH:${pkgs.git}/bin:${pkgs.openssh}/bin:${pkgs.nix}/bin export PATH=$PATH:${pkgs.git}/bin:${pkgs.openssh}/bin:${pkgs.nix}/bin
exec ${pkgs.nix}/bin/nix run .#deploy-rs -- \ exec ${pkgs.nix}/bin/nix run .#deploy-rs -- \
--ssh-opts="-i ''${CREDENTIALS_DIRECTORY}/ssh-key" \ --ssh-opts="-i ''${CREDENTIALS_DIRECTORY}/ssh-key" \
--ssh-user=deployerbot-follower \ --ssh-user=deployerbot-follower \
--targets ${deployDerivationsStr} --targets ${deployDerivationsStr}
export PATH=$OLD_PATH
${pkgs.git}/bin/git push origin main
''; '';
}; };