name: Nix Build

on:
  push:

jobs:
  nix-build:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v3
        with:
          ssh-key: ${{ secrets.WORKFLOW_SSH_KEY }}

      - name: Install Nix
        uses: DeterminateSystems/nix-installer-action@v4

      - name: Run the Magic Nix Cache
        uses: DeterminateSystems/magic-nix-cache-action@v1

      - name: Build Aiken
        run: nix build

