From e5a4632fd8d723b0c9dbf21c555324d87c59fffe Mon Sep 17 00:00:00 2001 From: cuqmbr Date: Mon, 23 Jun 2025 21:20:37 +0300 Subject: [PATCH] update --- .github/workflows/deploy.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2c121fb..9418b9b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,9 +13,14 @@ jobs: run: git clone https://git.cuqmbr.xyz/cuqmbr/homelab.git --depth 1 --branch main --single-branch - name: Setup ansible run: apt-get update && apt-get install ansible-core -y - - name: Create ssh key file - run: echo -n "${{secrets.ANSIBLE_SSH_KEY}}" > key - - name: Add key to ssh agent - run: ssh-add key + - name: Add SSH key + env: + SSH_AUTH_SOCK: /tmp/ssh_agent.sock + run: | + # ssh-keyscan example.com >> /home/runner/.ssh/known_hosts + echo -n "${{secrets.ANSIBLE_SSH_KEY}}" > key + chmod 600 key + ssh-agent -a $SSH_AUTH_SOCK > /dev/null + ssh-add key - name: Run ansible playbook run: cd ./homelab/ansible; ansible-playbook -u gitea-actions --ssh-common-args "-o ProxyCommand='ssh -p 22 -W %h:%p -q gitea-actions@bastion.cuqmbr.home'" -b --become-method doas --start-at-task 'Install hugo deb package from github.' -i inventories/dev/hosts.yml 20_main_page.yml