keep repo in /etc/nixos
All checks were successful
/ deploy (push) Successful in 31s

This commit is contained in:
toufic ar 2026-01-07 19:48:52 +02:00
parent fe3c6d1fd7
commit 1351a2de1a
Signed by: toufic ar
SSH key fingerprint: SHA256:/NaO5I1nG3gYKzrzSiTYIdRyaIYxDWfr1U+d+yfJ/4k

View file

@ -20,19 +20,15 @@ jobs:
ssh-keyscan toufy.me > /root/.ssh/known_hosts ssh-keyscan toufy.me > /root/.ssh/known_hosts
echo "${{ secrets.SSH_KEY }}" | tr -d "\r" > /root/.ssh/id_ed25519 echo "${{ secrets.SSH_KEY }}" | tr -d "\r" > /root/.ssh/id_ed25519
chmod -R 600 /root/.ssh chmod -R 600 /root/.ssh
echo "pubkey: "
ssh-keygen -y -f /root/.ssh/id_ed25519
- name: copy repo to target - name: copy repo to target
run: rsync -az . root@toufy.me:/tmp/deploy run: rsync -az . root@toufy.me:/etc/nixos
- name: nixos-rebuild test - name: nixos-rebuild test
run: | run: |
set -e set -e
ssh root@toufy.me -C "nixos-rebuild test --flake /tmp/deploy --impure" ssh root@toufy.me -C "nixos-rebuild test --flake /etc/nixos --impure"
[ "$?" == 0 ] || exit 1 [ "$?" == 0 ] || exit 1
- name: nixos-rebuild switch - name: nixos-rebuild switch
run: | run: |
set -e set -e
ssh root@toufy.me -C "nixos-rebuild switch --flake /tmp/deploy --impure" ssh root@toufy.me -C "nixos-rebuild switch --flake /etc/nixos --impure"
[ "$?" == 0 ] || exit 1 [ "$?" == 0 ] || exit 1
- name: clean up
run: ssh root@toufy.me -C "rm -rf /tmp/deploy"