Files @ 29984fbe5d02
Branch filter:

Location: freifunk/Ansible-Configuration/web/tasks/hugo.yml - annotation

x
fix: add API.yml
---
# Setup the Hugo website
- name: "Get package facts"
  package_facts:
    manager: "apt"
- name: "Install Hugo"
  ansible.builtin.apt:
    deb: "https://github.com/gohugoio/hugo/releases/download/v0.119.0/hugo_extended_0.119.0_linux-amd64.deb"
    state: present
  become: true
  when: "'hugo' not in ansible_facts.packages"
- name: "Make sure repos directory exists"
  ansible.builtin.file:
    path: "~/repos"
    state: directory
  become: true
  become_user: fflux
- name: "Clone website repo"
  ansible.builtin.git:
    repo: "ssh://kallithea@projects.c3l.lu/freifunk/web/website"
    dest: "/home/fflux/repos/website"
    version: "main"
  become: true
  become_user: fflux
- name: "Build the website"
  ansible.builtin.command:
    chdir: "/home/fflux/repos/website"
    cmd: "hugo --minify"
  become: true
  become_user: fflux