34 lines
870 B
YAML
34 lines
870 B
YAML
name: Deploy cryodev-main
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
deploy-cryodev-main:
|
|
runs-on: docker
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Nix
|
|
uses: cachix/install-nix-action@v27
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
|
|
- name: Set up SSH
|
|
env:
|
|
DEPLOY_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
|
|
run: |
|
|
mkdir -p ~/.ssh
|
|
echo "$DEPLOY_KEY" > ~/.ssh/id_ed25519
|
|
chmod 600 ~/.ssh/id_ed25519
|
|
|
|
# Add host key (replace with actual host key or use ssh-keyscan in unsafe environments)
|
|
ssh-keyscan -H cryodev.xyz >> ~/.ssh/known_hosts
|
|
|
|
- name: Deploy with deploy-rs
|
|
run: |
|
|
# Deploy using deploy-rs
|
|
nix run github:serokell/deploy-rs -- -s .#cryodev-main
|