--- # yamllint disable rule:line-length name: deploy neuro on: # yamllint disable-line rule:truthy workflow_dispatch: concurrency: group: deploy-neuro cancel-in-progress: false jobs: deploy: name: deploy neuro from performance node if: ${{ gitea.ref == 'refs/heads/master' }} runs-on: gross-nix-x86-perf timeout-minutes: 30 env: NIX_CONFIG: | extra-substituters = https://cache.nixos.org https://cache.hectic-lab.com/hectic extra-trusted-public-keys = hectic:KMQsKow4SoA9K2vOJlOljmx7/Zpf91Yy+5qEtxDDCzA= DEPLOY_REVISION: ${{ gitea.sha }} steps: - name: Checkout dispatched revision uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ gitea.sha }} persist-credentials: false - name: Show runner and cache configuration run: | set -eu uname -a nix --version nix config show substituters nix config show trusted-public-keys - name: Deploy neuro env: NEURO_SSH_PRIVATE_KEY: ${{ secrets.NEURO_SSH_PRIVATE_KEY }} NEURO_SSH_KNOWN_HOSTS: ${{ secrets.NEURO_SSH_KNOWN_HOSTS }} run: | set -eu test -n "$NEURO_SSH_PRIVATE_KEY" test -n "$NEURO_SSH_KNOWN_HOSTS" ssh_home=$(mktemp -d) trap 'rm -rf "$ssh_home"' EXIT install -d -m 700 "$ssh_home/.ssh" printf '%s\n' "$NEURO_SSH_PRIVATE_KEY" > "$ssh_home/.ssh/id_ed25519" printf '%s\n' "$NEURO_SSH_KNOWN_HOSTS" > "$ssh_home/.ssh/known_hosts" chmod 600 "$ssh_home/.ssh/id_ed25519" "$ssh_home/.ssh/known_hosts" cat > "$ssh_home/.ssh/config" <