Files
casa/.gitea/workflows/host.yml
Márcio Fernandes b0c4d8e929
Some checks failed
deploy host / deploy (push) Failing after 1s
.
2024-09-01 03:12:11 +01:00

61 lines
1.5 KiB
YAML

name: deploy host
on:
push:
paths-ignore:
- "services/**"
- "docs/**"
- ".gitea/workflows/**services**.yml"
jobs:
# setup-runner:
# runs-on: homesrv01
# image: homesrv/git-runner
# steps:
# - name: Checkout code
# uses: actions/checkout@v2
#
deploy:
runs-on: homesrv01
container:
image: homesrv/git-runner
volumes:
- workspace:/workspace
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: build git runner
shell: bash
run: |
docker build ${{gitea.workspace}}/services/git-runner --tag homesrv/git-runner
- name: Run Ansible Playbook
env:
#ANSIBLE_USER: ${{ secrets.ANSIBLE_USER }}
ANSIBLE_HOST_KEY_CHECKING: False
run: |
wget http://${{secrets.SERVER_ADDRESS}}
ansible-playbook \
-i ${{secrets.SERVER_ADDRESS}}, ${{gitea.workspace}}/ansible/site.yml \
--private-key xxxx \
-u xxxx
# - name: Install Ansible
# shell: bash
# run: |
# sudo apt update
# sudo apt install -y ansible
# - name: Docker tests
# run: |
# docker pull librespace/ansible
# docker run \
# --mount type=bind,source="$(pwd)"/ansible,target=/ansible \
# librespace/ansible \
# ansible-playbook ansible/site.yml --private-key xxxx -u xxxx