03 · GitHub Repos
Repo creation (user’s terminal)
Section titled “Repo creation (user’s terminal)”gh auth login # device flow, account: sambaseness
cd ~/dev/public-docs && gh repo create public-docs --public --source . --pushcd ~/dev/private-docs && gh repo create private-docs --private --source . --pushResult:
sambaseness/public-docs(PUBLIC)sambaseness/private-docs(PRIVATE)
Both pushed and tracking upstream. Nothing appeared broken at this point — but something silently was.
Gotcha #2 — master vs main: the silent pipeline-killer
Section titled “Gotcha #2 — master vs main: the silent pipeline-killer”create-astro initialized the local repos with master as the default branch (its “Initial commit from Astro”), so gh repo create pushed master. But every workflow file watches branches: [main]:
on: push: branches: [main]The pipelines would have never fired — CI green-lighted, deploys never happening, no error anywhere.
Fix — rename everywhere
Section titled “Fix — rename everywhere”git branch -M main # rename local branchgit push -u origin main # push itgh repo edit --default-branch main # point GitHub's default at itgit push origin --delete master # drop the stale remote branch(Deleting master must come after changing the default branch — GitHub refuses to delete the default.)
Reasoning
Section titled “Reasoning”Caught it the moment I saw the push output in the user’s session. For branch-protected main-based workflows, drift between local default and CI trigger branch is the classic “everything looks fine, nothing deploys” failure. Renaming early (one commit, no PRs, no collaborators) is free.
Gotcha #3 — gh needs GH_CONFIG_DIR here
Section titled “Gotcha #3 — gh needs GH_CONFIG_DIR here”From the agent shell, gh claimed “You are not logged in” despite a valid hosts.yml:
GH_CONFIG_DIR=$HOME/.config/gh gh auth status# ✓ Logged in to github.com account sambaseness (keyring)The config file exists but the default discovery path doesn’t pick it up in this shell. Any future gh call from the agent environment uses the prefix.
Verification
Section titled “Verification”gh repo view --json name,defaultBranchRef,visibility# public-docs → default: main (PUBLIC)# private-docs → default: main (PRIVATE)Update note: the push happened again after the branch rename, which also re-ran the workflows — CI passed even without the Cloudflare secrets (those are only needed by the Deploy job).
Side discovery — Twilight’s real setup
Section titled “Side discovery — Twilight’s real setup”While establishing conventions, checked how the existing Twilight blog deploys:
- It’s its own repo:
sambaseness/twilight .pages.ymlis Pages-CMS content config (media + content collections), NOT a Cloudflare build config — an earlier claim that Twilight is “on Cloudflare Pages” was wrong- It ships
netlify.toml(template example) andvercel.json— real host still ambiguous
Lesson recorded: .pages.yml ≠ Cloudflare config. Don’t infer hosting from filename.