mirror of
https://github.com/CPunch/openpunk-ansible.git
synced 2024-12-21 21:40:08 +00:00
blog: maintain two separate builds of the site; one for tor, one for https
This commit is contained in:
parent
1028023b8b
commit
ca6fdaeff3
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"yaml.schemas": {
|
||||
"https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible.json#/$defs/tasks": "file:///home/cpunch/projects/openpunk-ansible/roles/nginx/tasks/main.yml"
|
||||
}
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
---
|
||||
contact_email: openpunk@proton.me
|
||||
contact_email: openpunk@proton.me
|
||||
onionDomain: http://opnpnk6eutjiqy4ndpyvwxd5pncj2g2cmz6fkocr5uh3omnn4utvspad.onion
|
@ -4,7 +4,7 @@
|
||||
repo: "https://github.com/CPunch/openpunk.git"
|
||||
dest: "/var/www/{{ domain }}"
|
||||
|
||||
# TODO: make idempotent
|
||||
# TODO: make idempotent (call the updateBlog script !!)
|
||||
- name: Build blog
|
||||
command:
|
||||
cmd: hugo
|
||||
|
@ -2,4 +2,7 @@
|
||||
cd /var/www/{{ domain }}
|
||||
/usr/bin/git fetch origin
|
||||
/usr/bin/git reset --hard origin/main
|
||||
/usr/bin/hugo
|
||||
|
||||
# build sites
|
||||
/usr/bin/hugo --cleanDestinationDir --minify -d public -b https://{{ domain }}
|
||||
/usr/bin/hugo --cleanDestinationDir --minify -d tor -b {{ onionDomain }}
|
||||
|
@ -16,3 +16,5 @@ sed -i 's/--DATE--/'$currDate'/g' $pageName
|
||||
git add .
|
||||
git commit -m "DeadSwitch: No response from CPunch in 14 days, posting dead.md"
|
||||
git push --force
|
||||
|
||||
updateBlog
|
@ -27,8 +27,6 @@
|
||||
template:
|
||||
src: templates/tor.conf
|
||||
dest: /etc/nginx/conf.d/tor-{{ domain }}.conf
|
||||
force: no
|
||||
notify: setup nginx
|
||||
|
||||
- name: Enable Nginx
|
||||
systemd:
|
||||
|
@ -1,5 +1,5 @@
|
||||
server {
|
||||
root /var/www/{{ domain }}/public;
|
||||
root /var/www/{{ domain }}/tor;
|
||||
index index.html index.htm;
|
||||
|
||||
location / {
|
||||
|
Loading…
Reference in New Issue
Block a user