-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1.01 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Deploy
on:
workflow_dispatch:
workflow_run:
workflows: ["CI"]
branches: [main]
types:
- completed
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: NixInstaller
uses: DeterminateSystems/nix-installer-action@main
- name: MagicNixCache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Tailscale
uses: tailscale/github-action@v2
with:
oauth-client-id: ${{ secrets.TAILSCALE_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TAILSCALE_OAUTH_CLIENT_SECRET }}
tags: tag:deploy-rs
version: 1.58.2
- name: SshKey
uses: shimataro/ssh-key-action@v2
with:
name: id_key
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ vars.SSH_KNOWN_HOSTS }}
- name: Deploy
run: |
nix run .#deploy -- --ssh-opts="-i $HOME/.ssh/id_key -o UserKnownHostsFile=$HOME/.ssh/known_hosts"