Skip to content

Deploy

Deploy #2

Workflow file for this run

name: Deploy
on:
workflow_dispatch:
workflow_run:
workflows: ["CI"]
branches: [main]
types:
- completed
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v4
- name: Setup cache
uses: DeterminateSystems/[email protected]
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
name: id_key
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ vars.SSH_KNOWN_HOSTS }}
- name: Run deployment
run: |
nix run .#deploy -- --ssh-opts="-i $HOME/.ssh/id_key -o UserKnownHostsFile=$HOME/.ssh/known_hosts"