Add deploy.sh + .deploy.env.example; update index.html (sponsor checkout link)

This commit is contained in:
inference-bot committed 2026-09-18 11:37:09 -06:00
1 parent cdf25c6331
commit 3c9bff9667
4 files changed
+71 -1

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
# Deploy credentials for inference.coop Surfer (WebDAV).
# This file is gitignored — never commit it.
# Copy to .deploy.env and fill in the values.
SURFER_URL=https://inference.coop/_webdav/
SURFER_USER=
SURFER_TOKEN=
+3
View File
@@ -0,0 +1,3 @@
# Deploy credentials — never commit
.deploy.env
.cloudron.env
+60
View File
@@ -0,0 +1,60 @@
#!/usr/bin/env bash
# Deploy the Inference Cooperative landing page to Cloudron Surfer via WebDAV.
#
# Usage:
# ./deploy.sh
#
# Credentials are read from .deploy.env (gitignored) or environment variables:
# SURFER_URL WebDAV base URL (e.g. https://inference.coop/_webdav/)
# SURFER_USER WebDAV username
# SURFER_TOKEN WebDAV password / app token
#
# The script uploads the contents of landing-page/ (index.html, favicon.svg,
# fonts/) to the Surfer instance, creating directories as needed and
# overwriting existing files.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SITE_DIR="$SCRIPT_DIR/landing-page"
# Load credentials from .deploy.env if present
if [[ -f "$SCRIPT_DIR/.deploy.env" ]]; then
set -a
# shellcheck disable=SC1091
source "$SCRIPT_DIR/.deploy.env"
set +a
fi
: "${SURFER_URL:?SURFER_URL is required (set in .deploy.env or env)}"
: "${SURFER_USER:?SURFER_USER is required}"
: "${SURFER_TOKEN:?SURFER_TOKEN is required}"
# Strip trailing slash for clean joining
SURFER_URL="${SURFER_URL%/}"
AUTH=(-u "$SURFER_USER:$SURFER_TOKEN")
echo "Deploying $SITE_DIR -> $SURFER_URL"
# 1. Create all directories (MKCOL). WebDAV requires parent collections to
# exist before files can be uploaded into them.
find "$SITE_DIR" -type d | while read -r dir; do
rel="${dir#"$SITE_DIR"}"
# Skip the root (rel is empty)
[[ -z "$rel" ]] && continue
dest="$SURFER_URL/$rel"
echo " mkdir $rel"
# MKCOL returns 405 if the collection already exists — that's fine.
curl -sS -X MKCOL "${AUTH[@]}" "$dest" >/dev/null 2>&1 || true
done
# 2. Upload every file, preserving relative paths.
find "$SITE_DIR" -type f | while read -r file; do
rel="${file#"$SITE_DIR"/}"
dest="$SURFER_URL/$rel"
echo " -> $rel"
curl -sS -f -T "$file" "${AUTH[@]}" "$dest"
done
echo "Deploy complete."
+1 -1
View File
@@ -386,7 +386,7 @@
</div> </div>
<div class="cta-row"> <div class="cta-row">
<a class="cta" href="https://opencollective.com/inference-cooperative/donate?redirect=https://inference.coop/thanks/">Become a member</a> <a class="cta" href="https://opencollective.com/inference-cooperative/contribute/sponsors-105477/checkout?interval=month&amount=15">Become a member</a>
<a class="cta-secondary" href="https://my.inference.coop">Member login</a> <a class="cta-secondary" href="https://my.inference.coop">Member login</a>
</div> </div>