improve how theme are deployed
This commit is contained in:
parent
1c80b16f1a
commit
d089644d0f
1 changed files with 17 additions and 4 deletions
|
@ -39,14 +39,27 @@
|
|||
become_user: "{{ forgejo_user }}"
|
||||
tags: theme
|
||||
|
||||
- name: "[THEME] - Find css files from different repos and copy them in the public folder"
|
||||
shell:
|
||||
cmd: find "{{ forgejo_theme_dir }}" -type f -name "*.css" -not -path "{{ forgejo_theme_dir }}/public/*" | xargs cp -t "{{ forgejo_theme_dir }}/public/assets/css"
|
||||
chdir: "{{ forgejo_theme_dir }}"
|
||||
- name: "[THEME] - Find css files from different repos"
|
||||
find:
|
||||
paths: "{{ forgejo_theme_dir }}"
|
||||
patterns: "*.css"
|
||||
recurse: yes
|
||||
register: css_files
|
||||
tags: theme
|
||||
|
||||
- name: "[THEME] - Copy css files to the public folder"
|
||||
copy:
|
||||
src: "{{ item.path }}"
|
||||
dest: "{{ forgejo_theme_dir }}/public/assets/css/"
|
||||
remote_src: yes
|
||||
force: yes
|
||||
with_items: "{{ css_files.files }}"
|
||||
when: "'/public/' not in item.path"
|
||||
become: true
|
||||
become_user: "{{ forgejo_user }}"
|
||||
tags: theme
|
||||
|
||||
|
||||
# Lastly, update app.ini by adding the theme's name list.
|
||||
- name: "[THEME] - Get and prepare a list for app.ini of css files in public folder, register it"
|
||||
shell:
|
||||
|
|
Loading…
Reference in a new issue