From a90be7d4d2b00ef8156d744c0220d2fa3561530e Mon Sep 17 00:00:00 2001 From: mafyuh Date: Sun, 9 Jun 2024 19:21:52 +0000 Subject: [PATCH] Add deploy.yml --- deploy.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 deploy.yml diff --git a/deploy.yml b/deploy.yml new file mode 100644 index 0000000..f528edd --- /dev/null +++ b/deploy.yml @@ -0,0 +1,15 @@ +--- +- name: Deploy application + hosts: "{{ target_host }}" + vars: + repo_path: /Auto-Homelab/{{ folder }} + tasks: + - name: Ensure the repository is up-to-date + shell: git pull + args: + chdir: "{{ repo_path }}" + + - name: Restart services + command: docker-compose up -d + args: + chdir: "{{ repo_path }}"