feat: Enhance website deployment and build process

- Added rsync installation in setup-env action for file synchronization.
- Excluded playbook_websites.yml from ansible-apply-playbook workflow.
- Created a new workflow for building and releasing the Hugo website.
- Added submodule for Hugo theme in .gitmodules.
- Updated host_vars for production to include websites configuration.
- Introduced playbook_websites.yml for managing static files deployment.
- Implemented hugo_build script for building and archiving Hugo sites.
- Updated inventory to include a new web group for website deployment.
- Refactored Terraform configuration to support new website structure.
- Removed deprecated WordPress Terraform configuration.
- Added .gitignore files for websites and specific Hugo site.
- Created archetype and configuration files for the Hugo site.
- Added static assets including CV and images for the Hugo site.
- Integrated Hugo profile theme as a submodule for the website.
This commit is contained in:
2025-04-27 14:03:56 +02:00
parent 2fbe4dd1cc
commit 4e5346e2e0
24 changed files with 850 additions and 258 deletions
+50
View File
@@ -0,0 +1,50 @@
---
- name: Websites (Static Files) Playbook (K8s)
hosts: web
gather_facts: true
# Specific tasks for this playbook
tasks:
- name: Set required facts
ansible.builtin.set_fact:
web_home: "{{ persistent_data | default('/var/lib') }}/web"
web_user_id: 1000
web_group_id: 1000
tags: always
- name: Create required web data folder
become: true
ansible.builtin.file:
state: directory
path: "{{ web_home }}"
mode: "0750"
owner: "{{ web_user_id }}"
group: "{{ web_group_id }}"
tags:
- tasks
- tasks::folders
- name: Create required web data folder
become: true
ansible.builtin.file:
state: directory
path: "{{ web_home }}/{{ item }}"
mode: "0750"
owner: "{{ web_user_id }}"
group: "{{ web_group_id }}"
with_items:
- "{{ websites | default([]) }}"
tags:
- tasks
- tasks::folders
- name: Synchronize websites
become: true
ansible.posix.synchronize:
mode: push
src: "{{ lookup('env', 'GITHUB_WORKSPACE') + '/websites/releases/'+ item }}/"
dest: "{{ web_home }}/{{ item }}"
delete: yes
recursive: yes
with_items:
- "{{ websites | default([]) }}"