This repository has been archived on 2023-09-13. You can view files and clone it, but cannot push or open issues or pull requests.
homeserver-ansible/roles/services/website/tasks/main.yml

28 lines
728 B
YAML
Raw Normal View History

2022-02-27 16:05:34 -05:00
- name: Fetch site source
git:
dest: "/srv/web_source"
2022-02-27 16:05:34 -05:00
repo: "{{ site_repo }}"
register: site_source
- name: Make site directory in web root
file:
group: gitea
owner: gitea
path: "{{ webroot }}/site/"
state: directory
register: site_folder
- name: Deploy source to web root
shell:
cmd: "./ssg6 src {{ webroot }}/site/ 'dogeystamp' 'https://{{ domain }}/site'"
chdir: /srv/web_source
when: site_source.changed or site_folder.changed
- name: Cronjob to deploy source
cron:
user: http
name: "Update and deploy website source"
minute: 0
hour: "*/12"
job: "/srv/web_source/ssg6 /srv/web_source/src {{ webroot }}/site/ '{{ web_name }}' 'https://{{ domain }}/site'"