- index.html: polls Gitea API every 30s for new commits on main; shows countdown banner and auto-reloads when SHA changes - Dockerfile + docker-compose.yml: serve the site via nginx; main on :4200, staging on :4201 - deploy.sh: rebuild and restart a named service - .gitea/workflows/deploy.yml: SSH-deploy to host on every push to main (requires DEPLOY_HOST / DEPLOY_USER / DEPLOY_SSH_KEY repo secrets) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
18 lines
540 B
Bash
Executable File
18 lines
540 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# deploy.sh — spin up (or update) the Nexus staging environment
|
|
# Usage: ./deploy.sh — rebuild and restart nexus-main (port 4200)
|
|
# ./deploy.sh staging — rebuild and restart nexus-staging (port 4201)
|
|
set -euo pipefail
|
|
|
|
SERVICE="${1:-nexus-main}"
|
|
|
|
case "$SERVICE" in
|
|
staging) SERVICE="nexus-staging" ;;
|
|
main) SERVICE="nexus-main" ;;
|
|
esac
|
|
|
|
echo "==> Deploying $SERVICE …"
|
|
docker compose build "$SERVICE"
|
|
docker compose up -d --force-recreate "$SERVICE"
|
|
echo "==> Done. Container: $SERVICE"
|