Skip to content

03 · GitHub Repos

Terminal window
gh auth login # device flow, account: sambaseness
cd ~/dev/public-docs && gh repo create public-docs --public --source . --push
cd ~/dev/private-docs && gh repo create private-docs --private --source . --push

Result:

  • 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.

Terminal window
git branch -M main # rename local branch
git push -u origin main # push it
gh repo edit --default-branch main # point GitHub's default at it
git push origin --delete master # drop the stale remote branch

(Deleting master must come after changing the default branch — GitHub refuses to delete the default.)

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.


From the agent shell, gh claimed “You are not logged in” despite a valid hosts.yml:

Terminal window
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.


Terminal window
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.yml is 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) and vercel.json — real host still ambiguous

Lesson recorded: .pages.yml ≠ Cloudflare config. Don’t infer hosting from filename.