[claude] Live staging + auto-refresh on push (#33) #34

Merged
Timmy merged 1 commits from claude/the-nexus:claude/issue-33 into main 2026-03-24 01:30:30 +00:00
Member

Fixes #33

What this does

Auto-refresh when main advances

index.html polls the Gitea /branches/main endpoint every 30s. When the commit SHA changes, a banner flashes a countdown and the page auto-reloads — bookmark it and leave it open, it stays current.

Docker staging environments

  • Dockerfile: nginx:alpine serving the static site
  • docker-compose.yml: two services — nexus-main on port 4200 and nexus-staging on port 4201
  • deploy.sh: one-liner to rebuild and restart either service

CI auto-deploy on push

.gitea/workflows/deploy.yml triggers on every push to main, SSHes into the host, pulls, and redeploys. Set DEPLOY_HOST, DEPLOY_USER, DEPLOY_SSH_KEY (optionally DEPLOY_REPO_DIR) as repo secrets to activate.

Bookmarkable URL

git clone <repo> ~/the-nexus && cd ~/the-nexus
docker compose up -d nexus-main
# Bookmark: http://<your-host>:4200

The tab auto-refreshes whenever a new commit lands on main.

Fixes #33 ## What this does ### Auto-refresh when main advances `index.html` polls the Gitea `/branches/main` endpoint every 30s. When the commit SHA changes, a banner flashes a countdown and the page auto-reloads — bookmark it and leave it open, it stays current. ### Docker staging environments - `Dockerfile`: nginx:alpine serving the static site - `docker-compose.yml`: two services — `nexus-main` on **port 4200** and `nexus-staging` on **port 4201** - `deploy.sh`: one-liner to rebuild and restart either service ### CI auto-deploy on push `.gitea/workflows/deploy.yml` triggers on every push to `main`, SSHes into the host, pulls, and redeploys. Set `DEPLOY_HOST`, `DEPLOY_USER`, `DEPLOY_SSH_KEY` (optionally `DEPLOY_REPO_DIR`) as repo secrets to activate. ## Bookmarkable URL ```bash git clone <repo> ~/the-nexus && cd ~/the-nexus docker compose up -d nexus-main # Bookmark: http://<your-host>:4200 ``` The tab auto-refreshes whenever a new commit lands on main.
claude added 1 commit 2026-03-23 23:17:32 +00:00
- index.html: polls Gitea API every 30s for new commits on main;
  shows banner + auto-reloads within 5s when a new SHA is detected
- Dockerfile + docker-compose.yml: containerised serve for production
  (port 4200) and optional branch staging (port 4201, --profile staging)
- deploy.sh: one-liner to deploy production or staging locally
- .gitea/workflows/deploy.yml: CI job that SSH-deploys on push to main
  (gracefully skips if deploy secrets are not yet configured)

Fixes #33

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
claude force-pushed claude/issue-33 from e8e57ae4b0 to c4547d2e52 2026-03-24 01:21:32 +00:00 Compare
Timmy merged commit 3ea10209bc into main 2026-03-24 01:30:30 +00:00
Timmy deleted branch claude/issue-33 2026-03-24 01:30:32 +00:00
Sign in to join this conversation.