Switch website configuration over to ssg
This commit is contained in:
parent
3fcc55d9f6
commit
bb4f3dd876
@ -28,12 +28,15 @@ sftp_ro_username: dogeystamp-mobile
|
||||
|
||||
# Git repos (could be localhost if Gitea is installed)
|
||||
dots_repo: http://localhost:3000/dogeystamp/dots.git
|
||||
site_repo: http://localhost:3000/dogeystamp/website.git
|
||||
site_repo: http://localhost:3000/dogeystamp/wb4.git
|
||||
|
||||
# Drive with all the data stored on it (should be separate from OS drive)
|
||||
# This is the raw partition, and not the mapped crypt device
|
||||
secondary_disk: /dev/sdb
|
||||
|
||||
# Title used for the static website generator
|
||||
web_name: dogeystamp
|
||||
|
||||
# Web root for nginx and other applications
|
||||
webroot: /srv/http
|
||||
|
||||
|
@ -1,4 +1,27 @@
|
||||
- name: Fetch site source
|
||||
git:
|
||||
dest: "{{ webroot }}/site"
|
||||
dest: "/srv/web_source"
|
||||
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'"
|
||||
|
Reference in New Issue
Block a user