name: Deploy krustyplanet.org on: push: branches: [main] jobs: deploy: runs-on: ubuntu-latest container: image: node:22-bookworm volumes: - /home/agent/.ssh:/home/root/.ssh:ro steps: - name: Checkout uses: actions/checkout@v4 - name: Install system dependencies run: apt-get update && apt-get install -y rsync openssh-client - name: Setup SSH run: | mkdir -p ~/.ssh cp /home/root/.ssh/id_ed25519 ~/.ssh/id_ed25519 chmod 600 ~/.ssh/id_ed25519 chmod 700 ~/.ssh echo "5.161.214.55 ssh-ed25519 $(ssh-keyscan -t ed25519 5.161.214.55 2>/dev/null | awk '{print $3}')" > ~/.ssh/known_hosts - name: Deploy to clearnet run: | rsync -avz --delete \ --exclude '.git' \ --exclude '.forgejo' \ --exclude 'terraform' \ --exclude 'research' \ ./ root@5.161.214.55:/var/www/krustyplanet/ - name: Sync eepsite from clearnet run: | ssh root@5.161.214.55 bash -s << 'SCRIPT' set -euo pipefail CLEARNET="/var/www/krustyplanet" EEPSITE="/var/www/eepsite" # Sync shared static assets rsync -av --delete "$CLEARNET/css/" "$EEPSITE/css/" rsync -av --delete "$CLEARNET/js/" "$EEPSITE/js/" cp "$CLEARNET/favicon.svg" "$EEPSITE/favicon.svg" # Shared pages to sync SHARED_PAGES=("index.html" "services.html" "pricing.html" "contact.html") for page in "${SHARED_PAGES[@]}"; do cp "$CLEARNET/$page" "$EEPSITE/$page" # Replace I2P self-reference with clearnet link sed -i 's|🔒 I2P:.*

|🌐 Clearnet: https://krustyplanet.org

|' "$EEPSITE/$page" # Remove nav links to clearnet-only pages sed -i '/href="\/free-audit\.html"/d' "$EEPSITE/$page" sed -i '/href="\/blog\.html"/d' "$EEPSITE/$page" done # Add I2P privacy notice to contact form sed -i '/
/a\
\ ⚠ I2P Privacy Notice: Your message will be sent to the site operator via email outside the I2P network. Please do not include anything you would not share on the clearnet.\
' "$EEPSITE/contact.html" echo "Eepsite synced." SCRIPT