This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
name: Build and Deploy
|
||||
name: Build
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
build:
|
||||
runs-on: nix
|
||||
steps:
|
||||
- uses: https://github.com/actions/checkout@v4
|
||||
@@ -18,22 +18,12 @@ jobs:
|
||||
- name: Build NixOS configuration (yarn)
|
||||
run: |
|
||||
nix build .#nixosConfigurations.yarn.config.system.build.toplevel -L
|
||||
mkdir -p /var/lib/dotfiles-deploy
|
||||
readlink -f result > /var/lib/dotfiles-deploy/yarn
|
||||
|
||||
- name: Build NixOS configuration (mreow)
|
||||
run: |
|
||||
nix build .#nixosConfigurations.mreow.config.system.build.toplevel -L
|
||||
|
||||
- name: Deploy to desktop
|
||||
run: |
|
||||
eval $(ssh-agent -s)
|
||||
ssh-add /run/agenix/ci-deploy-key
|
||||
if ssh -i /run/agenix/ci-deploy-key -o StrictHostKeyChecking=no -o ConnectTimeout=10 root@desktop "echo reachable" 2>/dev/null; then
|
||||
nix run github:serokell/deploy-rs -- .#yarn --ssh-opts="-o StrictHostKeyChecking=no"
|
||||
echo "Deploy to desktop succeeded"
|
||||
else
|
||||
echo "Desktop unreachable - skipping deploy. Build succeeded."
|
||||
fi
|
||||
|
||||
- name: Notify success
|
||||
if: success()
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user