Commit

Deployments: a preview for every pull request, production on g1t.page

Every pull request gets a live preview at pr-<n>--<repo>--<owner>.g1t.page, shown on it as the check `g1t / deploy`, and the default branch deploys to <repo>--<owner>.g1t.page on each push. Apps are Workers in a Workers for Platforms namespace, so one no one visits runs nothing and costs nothing. A paid feature: the workspace turns on the Deployments plan, then each repository turns deployments on; one click turns either off. - services/deployments (new): hears pull requests opened, ready, pushed to, closed and merged, and pushes to the default branch; checks the plan with billing's `has_feature`; starts a build on the runner; opens Cloudflare's asset upload for the build's files and puts the app in the namespace; sets the commit status with the preview's address. A sweep every 10 minutes fails builds that died, counts requests and CPU time from Workers analytics, takes down previews idle past the repository's idle days and every app of a workspace whose plan ended, and charges a month that is over past its allowance, once. - services/pages (new): the dispatcher on *.g1t.page. The hostname's first label is the app's script name, so it needs no lookup. Previews are noindex; a missing app gets a page saying why. - Runner: MODE=deploy builds a Workers project (wrangler deploy --dry-run) or a static site (its build script, then dist, build, out, public, _site or .output/public), uploads the files with a key that can upload only them, and sends the bundle to g1t. No Cloudflare credential is ever in the sandbox. `start_deploy` on the runner Worker. - API: POST /deployments/jobs/<id>/<step> passes a build's reports, with its own token, to the deployments service. - Billing: builds are charged by the second at the container price plus 20% ($0.0015 a minute); prices under a cent show their digits. - Site: a repository's Deployments page (turn on, what is up, recent builds, redeploy, take down, settings, turn off) and each build's page with its log; the Billing plan card shows this month's use against the allowance. - Docs: guides/deployments (what deploys, previews, production, when apps come down, settings, costs, turning it off, how it works, troubleshooting, self-hosting); Plans in usage-and-billing; docs home and llms.txt.

syntaqxcommitted Parent6afb0c2Browse files

No changes

This commit changes no files.