blog: maintain two separate builds of the site; one for tor, one for https

This commit is contained in:
CPunch 2023-01-16 17:17:07 -06:00
parent 1028023b8b
commit ca6fdaeff3
7 changed files with 15 additions and 6 deletions

5
.vscode/settings.json vendored Normal file
View 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"
}
}

View File

@ -1,2 +1,3 @@
---
contact_email: openpunk@proton.me
contact_email: openpunk@proton.me
onionDomain: http://opnpnk6eutjiqy4ndpyvwxd5pncj2g2cmz6fkocr5uh3omnn4utvspad.onion

View File

@ -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

View File

@ -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 }}

View File

@ -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

View File

@ -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:

View File

@ -1,5 +1,5 @@
server {
root /var/www/{{ domain }}/public;
root /var/www/{{ domain }}/tor;
index index.html index.htm;
location / {