Skip to content

infra: Automatically deploy makemake #2

infra: Automatically deploy makemake

infra: Automatically deploy makemake #2

Workflow file for this run

name: makemake
on:
push:
branches:
- main
- makemake
jobs:
deploy:
environment: makemake
runs-on: ubuntu-latest
env:
SSH_KEY: ${{ secrets.SSH_KEY }}
steps:
- { uses: 'actions/checkout@v4', name: 'Checkout' }
- uses: 'DeterminateSystems/nix-installer-action@main'
name: 'Install Nix'
with: { extra-conf: 'experimental-features = no-url-literals' }
- name: Prepare SSH
run: |
mkdir -p ~/.ssh
printenv SSH_KEY > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
echo "makemake.ngi.nixos.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID4ejRuAQPx6AbuS1u+Q7UUi1TIwkY2S//kjgpBxYNfU" \
> ~/.ssh/known_hosts
- name: Deploy
run: |
HOST="root@makemake.ngi.nixos.org"
nix run nixpkgs#nixos-rebuild -- switch \
--flake github:${{ github.repository }}/${{ github.sha }}#makemake \
--build-host ${HOST} \
--target-host ${HOST}