# Git connections and moving a static website

DeployBeacon serves already-built static files. Git pushes can prepare private
previews when the server's Git integration is configured. GitHub App setup is
owner-controlled; its dashboard reports unavailable until configured. The App
reads only selected repositories that the confirming user's GitHub account can
access. Its repository authorization lasts 24 hours and must be confirmed again
after expiry; organisation installation visibility grants no broader access.
Fork pull requests are ignored. Check runs
link to the signed-in dashboard; they do not expose a public bearer link.
Nothing builds dependencies or runs customer server code on this host.

## Generic Git and GitLab webhooks

Connect a repository from its Deployments page using a public HTTPS commit ZIP
address with {commit} exactly once. Downloads refuse redirects, private network
addresses and the platform's origin. Copy the displayed endpoint and one-time
secret to your Git host or CI settings. Keep the secret out of files and logs.
Send the exact JSON body with ref and a40- or64-character hexadecimal commit.
Use X-DeployBeacon-Signature: t=UNIX_SECONDS,v1=HEX_HMAC_SHA256. Compute the HMAC
over ASCII timestamp, a period, then the exact request-body bytes. A timestamp
within five minutes is required. GitHub/Gitea-style signed bodies are supported
as documented by the receiver; timestamped signatures are preferred.

Each connection queues at most40distinct refs. New pushes supersede older queued
pushes for that ref. A503queue-full response saves neither the delivery nor its
replay receipt and can be retried. Verified bodies are deduplicated for90days.
Processing uses a durable lease and rechecks the source revision and current
user access before saving an inspection or private preview. Losing access,
pausing, disconnecting or replacing the secret fences older in-flight work.
Resuming processes future pushes; paused deliveries are not replayed. SSH deploy
keys can be prepared, but their isolated fetcher is not available yet.

If a worker stops during preview preparation, the interrupted private release is
retained as failed. A later push retries in a new immutable release; an incomplete
folder is never reused. Source retry keys are reserved for server-created work.

## Hostinger and cPanel backups

Prefer a files backup (.tar.gz, .tgz or .zip) over an account-wide API token.
Upload it in Deployments → Move an existing website, or use the downloaded CLI:

    node deploybeacon.mjs migrate PROJECT_ID files-backup.tar.gz --confirm

A backup with multiple websites asks which folder to import. Repeat with
--site FOLDER. Only the selected website's public files are copied. Mail,
hidden files, private database dumps, server configuration and links are
excluded. PHP and WordPress are identified as needing the isolated runtime;
their code and database credentials are not stored as static-site files.

The optional Hostinger API import uses a token once, in memory, against only
the fixed read-only Hostinger API. Choose the shortest expiry and revoke the
token afterwards: it carries broader account rights, including purchases.
The API cannot return binary assets; incomplete listings fail, and incomplete
text responses become findings that block publication. A process restart can
lose this unpersisted token; the expired import is marked failed by maintenance
and requires a fresh import. A files backup provides the complete static copy.

Imports create private inspected candidates, with findings and a DNS cutover
checklist. Check the preview, obtain dashboard publication approval, save the
existing DNS values, then follow the actual suggested records. Preserve MX and
other email records. DNS TTL changes and old-host cancellation are manual;
their completion is never inferred from an upload or successful build.

Read results through `source_get`, `migration_list` and `migration_get`.
`source_pause` and `source_disconnect` need explicit consent and cannot publish.
The CLI offers source, migrations, migration, source-pause, source-resume and
source-disconnect. Connection setup and one-time credentials use the dashboard.
API details: https://deploybeacon.ai/api/v1/openapi.json
