From c5056ea3743cd08b5ee06af67f00b70aceeba9dd Mon Sep 17 00:00:00 2001 From: Satria Date: Sat, 14 Mar 2026 11:54:38 +0700 Subject: [PATCH] setup ssh with uses --- .forgejo/workflows/activate.yml | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/.forgejo/workflows/activate.yml b/.forgejo/workflows/activate.yml index 469f04f..2f39882 100644 --- a/.forgejo/workflows/activate.yml +++ b/.forgejo/workflows/activate.yml @@ -16,17 +16,26 @@ jobs: shell: /bin/sh -e {0} steps: - - name: Clone Repository - run: | - rm -rf src - git clone https://git.satr14.my.id/satr14/nix-flake.git src - - - name: Setup SSH Key - run: | - mkdir -p ~/.ssh - echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/id_ed25519 - chmod 600 ~/.ssh/id_ed25519 - printf '%s\n' 'Host localhost 127.0.0.1 ::1' ' StrictHostKeyChecking no' ' UserKnownHostsFile /dev/null' >> ~/.ssh/config + # - name: Clone Repository + # run: | + # rm -rf src + # git clone https://git.satr14.my.id/satr14/nix-flake.git src + # - name: Setup SSH Key + # run: | + # mkdir -p ~/.ssh + # echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/id_ed25519 + # chmod 600 ~/.ssh/id_ed25519 + # printf '%s\n' 'Host localhost 127.0.0.1 ::1' ' StrictHostKeyChecking no' ' UserKnownHostsFile /dev/null' >> ~/.ssh/config + + - name: Checkout repository + uses: actions/checkout@v5 + + - name: Setup SSH + id: setupssh + uses: actions/setup-ssh@v1 + with: + ssh-private-key: ${{ secrets.DEPLOY_SSH_KEY }} + - name: Deploy System over SSH run: nixos-rebuild switch --flake ./src#homelab --target-host root@localhost -L --show-trace \ No newline at end of file