Table of Contents
- 🌐 Publishing the Docs Site
- What gets built
- Option A — Cloudflare Pages (recommended: free, builds private repos)
- Option B — Netlify (zero-config via
netlify.toml) - After your first deploy
- Privacy summary
🌐 Publishing the Docs Site¶
This repo can be published as a public learning-docs website while the GitHub repository stays private. The site is built from the Markdown with Material for MkDocs; only the rendered content is exposed — there is intentionally no link back to the private repo in the site.
What gets built¶
scripts/build-docs.py assembles the publishable Markdown into docs_build/
(so MkDocs' site_dir can sit outside its docs_dir), then mkdocs build
renders it to site/. Both folders are git-ignored.
pip install -r requirements-docs.txt
python3 scripts/build-docs.py && mkdocs serve # preview at http://localhost:8000
# or a one-off static build:
python3 scripts/build-docs.py && mkdocs build # output in ./site
Option A — Cloudflare Pages (recommended: free, builds private repos)¶
- Cloudflare dashboard → Workers & Pages → Create → Pages → Connect to Git.
- Authorize GitHub and pick
nabin747/go-from-zero(private is fine). - Build settings:
- Framework preset: None
- Build command:
pip install -r requirements-docs.txt && python3 scripts/build-docs.py && mkdocs build - Build output directory:
site - Environment variable:
PYTHON_VERSION = 3.12 - Save and Deploy → you get a public
https://<project>.pages.devURL.
The repo, code, and commit history stay private; every push to main
auto-rebuilds the site.
Option B — Netlify (zero-config via netlify.toml)¶
- Netlify → Add new site → Import an existing project → GitHub → authorize → pick the repo.
- Build command, publish dir (
site), and Python version are read automatically fromnetlify.toml. Click Deploy.
Option C — GitHub Actions → Cloudflare Pages (token-based, no dashboard connect)¶
The deploy-docs.yml workflow builds the
site on every content push and deploys it to Cloudflare Pages. It always builds
(so a broken docs build is caught) and only deploys when the secrets exist, so
it stays green until you configure it.
- Create a Cloudflare API token (My Profile → API Tokens → Create) with the Account → Cloudflare Pages → Edit permission, and note your Account ID.
- In the repo: Settings → Secrets and variables → Actions → New repository secret — add:
CLOUDFLARE_API_TOKENCLOUDFLARE_ACCOUNT_ID- Push to
main(or run the workflow manually). The Pages projectgo-from-zerois created automatically on the first deploy.
Suggested URL: https://go-from-zero.pages.dev (Cloudflare serves
<project>.pages.dev). pages.dev subdomains are globally unique — if
go-from-zero is taken, rename the project (e.g. nabin-go-from-zero) and update
--project-name in the workflow plus site_url in mkdocs.yml.
After your first deploy¶
- Set
site_url:inmkdocs.ymlto the published URL so the sitemap, canonical links, and social cards are correct. - (Optional) Add a custom domain in the host's dashboard.
Privacy summary¶
| Exposed publicly | Stays private |
|---|---|
| Rendered notes, cheatsheets, interview Qs, project SPECs/READMEs | The GitHub repository |
| The learning content as a readable site | Source .go internals beyond what notes link, full git history, issues, board |
The site is content-only by design. If you later make the repo public, you can add
repo_url:tomkdocs.ymlto turn on "edit this page" links.
⬅ docs · Repo README