Refactor deploy script
This commit is contained in:
parent
9a5f573be1
commit
439e5c6953
2 changed files with 21 additions and 12 deletions
14
utils/deploy
Executable file
14
utils/deploy
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "usage: deploy <hostname>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git push
|
||||
|
||||
gen-config $1 | ssh "${host}".dadada.li 'sudo cat - > /etc/nixos/configuration.nix && (nixos-rebuild test && nixos-rebuild switch) || (nixos-rebuild switch --rollback && exit 1)'
|
Loading…
Add table
Add a link
Reference in a new issue