# Migrating GitHub → Soft Serve + custard Move a repo off GitHub onto a self-hosted Soft Serve + custard forge, including deployment. Replace `your-host` / `you/tap` / `` with your values. See also [MANUAL.md](MANUAL.md). ## Step 1 — move the git repo (every migration) ```sh # 1. create it on Soft (or let it autocreate on first push) ssh soft repo create -d "what it is" # 2. point the local clone at Soft git remote set-url origin soft: # full move, or: git remote add soft soft: # keep GitHub as a backup mirror # 3. push everything (history, branches, tags) git push origin --all && git push origin --tags # 4. set visibility (public repos show on the forge) ssh soft repo private true|false ``` ## Step 2 — drop GitHub-only cruft (full self-host) - `.github/workflows/*` — GitHub Actions → replaced by `.custard.yaml` `ci` + `custard check/preview`. - `.goreleaser.yaml` — if releasing to a GitHub-hosted brew tap → replaced by custard's tap. - README badges/links pointing at github.com. ```sh git rm -r .github .goreleaser.yaml && git commit -m "drop GitHub CI/release" && git push ``` ## Step 3 — issues → Backlog.md GitHub Issues don't transfer. Use [Backlog.md](https://backlog.md): tasks live in `backlog/tasks/` and render on `/r//issues`. Recreate open issues by hand. --- ## Deployment, by type ### A. Static site / GitHub Pages → your server Pages goes away with GitHub. Serve the built site from your server with Caddy: 1. Build locally (Hugo/Jekyll/Astro/HTML) → an output dir (`public/`, `dist/`, …). 2. Add a Caddy site block for the domain → `file_server` over the output dir. 3. Point the domain's DNS at the server; Caddy issues TLS. 4. **Optional — gate through custard** with rsync in `.custard.yaml`: ```yaml ci: ["npm run build"] deploy: preview: "rsync -a ./public/ :/var/www/-preview/" promote: "rsync -a ./public/ :/var/www//" ``` Then `custard preview` (build + stage) → `custard promote` (go live). > custard is a git forge, not a static host — Caddy serves the files; custard just runs the build/deploy if you want the check+gate flow. ### B. Vercel app — stay on Vercel, point at the Soft repo Vercel's **git integration supports only GitHub/GitLab/Bitbucket**, so a Soft-hosted repo can't auto-deploy via Vercel's hook. Keep Vercel as the host, deploy from the **CLI**: 1. `vercel link` the repo to the existing Vercel project (keeps the prod URL). 2. In Vercel's dashboard, **disconnect the GitHub integration** (stop it deploying the old repo). 3. `.custard.yaml`: ```yaml ci: ["pnpm test", "pnpm build"] deploy: preview: vercel deploy promote: vercel promote {{url}} ``` 4. Push to Soft → `custard preview` (build HEAD, run ci, preview URL) → `custard promote` (same build → prod). You keep Vercel hosting + URLs; you trade Vercel's auto-PR previews + GitHub checks for on-demand `custard preview` + `.custard.yaml` `ci`. ### C. CLI / TUI → Homebrew ```yaml # .custard.yaml brew: { enabled: true, package: "." } # or ./cmd/ ``` ```sh ssh soft repo webhook create https://your-host/hooks/release \ -e branch_tag_create -c json -s "$WEBHOOK_SECRET" custard release v0.1.0 # install: brew tap you/tap https://your-host/git/homebrew-tap.git && brew install ``` Replaces GitHub Releases + a GitHub-hosted tap. ### D. Library / plain code Step 1 is the whole migration — browsable on the forge, tag versions as usual. --- ## What you give up off GitHub → the replacement | GitHub feature | On Soft + custard | |---|---| | Pull requests / review | Push-based + `custard check`/`preview` gate; branches if needed | | GitHub Actions CI | `.custard.yaml` `ci` via `custard check`/`preview` | | Issues | Backlog.md (`backlog/tasks/`, shown on the forge) | | Releases + assets | custard `/dl` tarballs + the tap | | Pages | Caddy static hosting on your server | | Vercel/Netlify git auto-deploy | `custard preview`/`promote` (CLI) | | Dependabot / scanning | none (manual) | ## Keep GitHub as a mirror (optional) ```sh git remote add github git@github.com:you/.git git push github --mirror # occasionally ``` (Then you're primary-on-Soft, not fully off GitHub.)