Files
cooperative.computer/deploy.sh
2026-05-12 12:23:44 -07:00

24 lines
760 B
Bash
Executable File

#!/bin/bash
set -x
# note: there's a feature request to determine this automatically with abra, https://git.coopcloud.tech/toolshed/abra/issues/821
SERVER=cooperative.computer
SERVER_PATH=/var/lib/docker/volumes/cooperative_computer_content/_data/
# Ensure static directory exists locally
mkdir -p static
# Generate site
pandoc -s --css=/static/style.css index.md > index.html
# Copy files (directory already exists in volume)
tar -cf - favicon.ico index.html static/ \
| ssh $SERVER \
"sudo tar -x --no-same-owner --owner=1000 -C $SERVER_PATH"
# abra app cp cooperative.computer index.html app:/var/www/http/
# abra app cp cooperative.computer favicon.ico app:/var/www/http/
# abra app cp cooperative.computer static app:/var/www/http/static/