Skip to content

Commit

Permalink
feat: added tailscale network to deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
xgroleau committed Feb 29, 2024
1 parent 21d1b4b commit f90f65f
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,30 @@ jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
- name: Checkout
uses: actions/checkout@v4

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

- name: Setup cache
- name: MagicNixCache
uses: DeterminateSystems/magic-nix-cache-action@main

- name: Install SSH key
- name: Tailscale
uses: tailscale/github-action@v2
with:
oauth-client-id: ${{ secrets.TAILSCALE_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TAILSCALE_OAUTH_SECRET }}
tags: tag:deploy-rs
version: 1.52.0

- name: SshKey
uses: shimataro/ssh-key-action@v2
with:
name: id_key
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ vars.SSH_KNOWN_HOSTS }}

- name: Run deployment
- name: Deploy
run: |
nix run .#deploy -- --ssh-opts="-i $HOME/.ssh/id_key -o UserKnownHostsFile=$HOME/.ssh/known_hosts"

0 comments on commit f90f65f

Please sign in to comment.