Skip to content

Deploy infra

Deploy infra #6

Workflow file for this run

name: Deploy infra
on:
workflow_dispatch:
workflow_call:
secrets:
serversshkey:
required: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-24.05
- name: Deploy
run: |
build() {
nix build --no-link "$@"
nix path-info "$@"
}
install -D -m 400 $(build '.#known-hosts') ~/.ssh/known_hosts
eval "$(ssh-agent)"
ssh-add - <<< "${{secrets.serversshkey}}"
cd infra
nix-build -A config.toplevel gen.nix -I infra=./infra.nix
nix-env -i libvirt -f '<nixpkgs>'
bash result/deploy || true