parent
abc149be35
commit
e5a4632fd8
13
.github/workflows/deploy.yml
vendored
13
.github/workflows/deploy.yml
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user