GitHub Deploy Runbook

Source: docs/operations/GITHUB_DEPLOY_RUNBOOK.md

Manual Index Client UI

GitHub Deploy Runbook

Purpose

This runbook defines how GitHub becomes the canonical deployment source for Earthbond while the app continues to run on the existing server.

The intended steady state is:

  1. Earthbond lives in its own GitHub repository
  2. WIICCO site assets remain separate from the deployment runtime
  3. the local server runs from a clone of the Earthbond repository
  4. the deployment branch is the only branch used for server rebuilds

The deploy branch is:

  1. main

The repository is:

  1. git@github.com:robby1312/earthbond.git

Model

  1. changes are committed locally
  2. automated backup pushes to origin/main
  3. GitHub Actions listens to pushes on main
  4. GitHub Actions opens an SSH session to the server
  5. the server fetches origin/main
  6. the server rebuilds and restarts the stack
  7. post-deploy healthcheck validates the result

Local Working Rule

This deployment model should be operated from the main branch locally.

That is now the enforced backup rule as well. The GitHub backup job is not intended to push ad hoc work from unrelated local branches.

Files

  1. deploy-earthbond.yml
  2. deploy_earthbond_from_github.sh
  3. check_stack_health.sh

Required GitHub Secrets

  1. EARTHBOND_DEPLOY_HOST
  2. EARTHBOND_DEPLOY_USER
  3. EARTHBOND_DEPLOY_SSH_KEY
  4. EARTHBOND_DEPLOY_PORT
  5. EARTHBOND_DEPLOY_REPO_DIR

Local Server Clone

For a clean server deployment checkout, use:

  1. bootstrap_earthbond_server_clone.sh

This creates or updates a local clone that tracks the Earthbond deployment branch directly from GitHub.

Server Behavior

The server-side deploy script:

  1. fetches origin/main
  2. checks out local branch main if needed
  3. hard-resets the working tree to origin/main
  4. runs:
  1. runs:

Important Boundary

This is a deployment-control workflow.

It does not make the app hosted by GitHub.

The app still runs on your server. GitHub becomes:

  1. the canonical source branch
  2. the trigger point for deployment
  3. the audit trail for deployed source

Risk

The deploy script performs:


git reset --hard origin/main

That is correct only if the server repo is treated as a deployment checkout and not as a place for ad hoc uncommitted edits.