Re-add website publication

I deleted this, thinking it was vestigal. It's not. This is where
it actually lives. netlfy isn't doing things because of how they
do DNS for root domains. Whoops.

Change-Id: Iad5d2212b6c2bfb3b1f375de2cc88609e91405ba
This commit is contained in:
Monty Taylor 2024-01-23 14:05:31 -08:00
parent 6675bc1421
commit 2bb476206b
2 changed files with 39 additions and 0 deletions

View File

@ -77,6 +77,15 @@
js_build_command: build
javascript_content_dir: out
- job:
name: inaugust-publish-website
parent: build-javascript-deployment
vars:
node_version: 18
js_build_command: build
javascript_content_dir: out
post-run: playbooks/publish.yaml
- job:
name: inaugust-publish-netlify
parent: inaugust-publish-javascript-to-netlify
@ -96,4 +105,5 @@
- inaugust-build-website
post:
jobs:
- inaugust-publish-website
- inaugust-publish-netlify

29
playbooks/publish.yaml Normal file
View File

@ -0,0 +1,29 @@
- hosts: all
tasks:
- name: Pull contents back
synchronize:
mode: pull
src: "/home/zuul/src/opendev.org/inaugust/inaugust.com/dist/"
dest: "{{ zuul.executor.work_root }}/dist/"
- hosts: localhost
tasks:
- name: Add ns1.inaugust.com to inventory
add_host:
name: ns1.inaugust.com
ansible_python_interpreter: python3
ansible_user: mordred
- name: Add ns1 hostkey to known hosts
known_hosts:
name: ns1.inaugust.com
key: "ns1.inaugust.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDvCg98cFYN7zqdF7742dlnme9lp7QGCemMlF68NLVpuDt7FxqH7blel2ju3upnz1LZHPU9nPuI/+ByYQ+7/1ezGS+N5CQIfWkvhFnBRlwNqIEP/Lfyw3LhFm72QRwDuKxkV5kKzZHXhNlg0I2PgLwDliijSX/0WW9Vgkb2zv/tLXbEM6LBSCXwAPjlfc6LVwmkY3vSxulU6kyL7Izyi83lD533g7jKP8KkOjuFEled8biKV2sP1hIc0tWWlL47G0jRdyB6LVmxOlb0arULfhqEWdW7qldIj2bPmUd2cAG522OoPYZQdDgGYPQlyS0ZJgWvjYoatUAyq8B7ELeJwqN62rcwn8yX3o+bykDX50HCKlrfHHsisST+YcOTtDG8X4H5UlGtMUygmpFEJjUOOoHD6dwmT1R92V5a3Sov1W2Fc7TcfmFoXo1G3N0/wsruVfmzJ7Q/WNtBf4p+c9DXTfJcNKfOIs6o/7ZrzexctEZQRFa7cxBEv2n+fVDN3DcQ12k="
- hosts: ns1.inaugust.com
tasks:
- name: Publish the contents
synchronize:
src: "{{ zuul.executor.work_root }}/dist/"
dest: "/var/www/inaugust.com/"