From 745536703310c537c44c757d83b13e5f239680ad Mon Sep 17 00:00:00 2001 From: Egor Savkin Date: Thu, 20 Jun 2024 17:43:34 +0800 Subject: [PATCH 1/2] Deploy web2019 to the intl domain Signed-off-by: Egor Savkin --- nixbld-etc-nixos/configuration.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nixbld-etc-nixos/configuration.nix b/nixbld-etc-nixos/configuration.nix index 5aacd89..cf7c50b 100644 --- a/nixbld-etc-nixos/configuration.nix +++ b/nixbld-etc-nixos/configuration.nix @@ -651,6 +651,16 @@ in job = web:web:web command = [ $(jq '.buildStatus' < $HYDRA_JSON) = 0 ] && ln -sfn $(jq -r '.outputs[0].path' < $HYDRA_JSON) ${hydraWwwOutputs}/web + + job = web:web:web-intl + command = [ $(jq '.buildStatus' < $HYDRA_JSON) = 0 ] && export HOME=`mktemp -d` && \ + mkdir $HOME/.ssh && \ + cp /opt/hydra_id_ed25519 $HOME/.ssh/id_ed25519 && \ + cp /opt/hydra_id_ed25519.pub $HOME/.ssh/id_ed25519.pub && \ + echo "5.78.86.156 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEMbV69aqkHdQ1T5lMuALyHjNowU1rottZtEV4OhKQ6Y" > $HOME/.ssh/known_hosts && \ + chmod 600 $HOME/.ssh/id_ed25519 && \ + ${pkgs.rsync}/bin/rsync -r -c $(jq -r '.outputs[0].path' < $HYDRA_JSON) zolaupd@5.78.86.156:/var/www/m-labs-intl.com/html/ + job = web:web:nmigen-docs command = [ $(jq '.buildStatus' < $HYDRA_JSON) = 0 ] && ln -sfn $(jq -r '.outputs[0].path' < $HYDRA_JSON) ${hydraWwwOutputs}/nmigen-docs -- 2.44.1 From 1b3efaa5dd8230b3cc9cfd7caa95ea6c22a6fe93 Mon Sep 17 00:00:00 2001 From: Egor Savkin Date: Mon, 24 Jun 2024 10:57:39 +0800 Subject: [PATCH 2/2] Remove temporary files after uploading website Signed-off-by: Egor Savkin --- nixbld-etc-nixos/configuration.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixbld-etc-nixos/configuration.nix b/nixbld-etc-nixos/configuration.nix index cf7c50b..bbf0fb2 100644 --- a/nixbld-etc-nixos/configuration.nix +++ b/nixbld-etc-nixos/configuration.nix @@ -659,7 +659,8 @@ in cp /opt/hydra_id_ed25519.pub $HOME/.ssh/id_ed25519.pub && \ echo "5.78.86.156 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEMbV69aqkHdQ1T5lMuALyHjNowU1rottZtEV4OhKQ6Y" > $HOME/.ssh/known_hosts && \ chmod 600 $HOME/.ssh/id_ed25519 && \ - ${pkgs.rsync}/bin/rsync -r -c $(jq -r '.outputs[0].path' < $HYDRA_JSON) zolaupd@5.78.86.156:/var/www/m-labs-intl.com/html/ + ${pkgs.rsync}/bin/rsync -r -c $(jq -r '.outputs[0].path' < $HYDRA_JSON)/ zolaupd@5.78.86.156:/var/www/m-labs-intl.com/html/ + rm -rf $HOME job = web:web:nmigen-docs -- 2.44.1