Website Deployment Workflow
Sidebar
Web Development · Website Deployment Workflow
From a Claude-generated course sitting in content/ to it actually appearing live on the site. content/ is the only thing anyone edits — nothing watches it automatically, so every step below has to be run on purpose.
The Two Folders
content/Source of truth — fragments, PDFs, solutions. Only place anyone hand-edits.astro-site/dist/Build output. Regenerated fresh every build; WinSCP syncs from here directly.website/Legacy — no longer part of the pipeline.→Files flow content/ → dist/ → server. Never backwards.Deploy: Steps 1–3
1Course content lands in content/<subject>/<course>/ (automatic when Claude writes it)2python scripts/python/build_<course>_pdf.py — combined PDF, only once a course completes3Sanity-check the course folder — no stray .html files that aren't real chaptersDeploy: Steps 4–6
4cd astro-site && npm run build — local machine only, never on the server—npm run preview — optional local check before syncing5WinSCP: astro-site/dist/ → server → rsync -avz --delete → /var/www/html/6Verify live — chapters listed, PDF/solution links workAdmin Page (/admin/)
whatRead-only stats dashboard — course/PDF counts. Not a content editor.authApache Basic Auth; .htpasswd exists only on the server, never committedcreatehtpasswd -c .htpasswd <user> — first time only (-c overwrites the whole file)resethtpasswd .htpasswd <user> — file already exists, drop -cforgot usercat .htpasswd on the server — each line is username:hashCommon Failure Symptoms
old content liveForgot Step 4 — content changed, but nobody rebuilt sincechapters missingA stray .html file in the course folder got treated as a fake chapter, breaking the whole course's buildchapters missing (2)A dist/-built page got copied back into content/ — the reverse-direction mistakeedit "disappeared"Someone hand-edited dist/ — always edit content/, then rebuildThe one rule that matters most
Files only ever flow content/ → dist/ → live server — never backwards. Every build fully regenerates dist/ from scratch, so it's always safe to delete; content/ is the only folder that should ever be hand-edited.