Local dev and deploy
Local development
Section titled “Local development”npm install # once, to install dependenciesnpm run dev # dev server at http://localhost:4321npm run build # astro check + static build into dist/npm run preview # serve the production build locallynpm run devgives you hot reload while editing content or components.npm run buildrunsastro check(type-checking and content-schema validation) beforeastro build. A failing build usually means a content file has a bad frontmatter field: read the error, it names the file and the field.npm run previewserves the builtdist/exactly as it will be deployed, which is the best final check before pushing.
How deploys happen
Section titled “How deploys happen”Deployment is automatic through GitHub Actions. The workflow lives at
.github/workflows/deploy.yml:
- It triggers on every push to the
mainbranch (and can be run manually viaworkflow_dispatch). - The
buildjob uses the officialwithastro/actionto install, build, and upload the static site as a Pages artifact. - The
deployjob publishes that artifact to GitHub Pages withactions/deploy-pages.
So the publish flow is: commit your content change, push (or merge a PR) to
main, and the site rebuilds and redeploys on its own. Watch the run in the
repository’s Actions tab if you want to confirm it succeeded.
Custom domain
Section titled “Custom domain”The site is served from calebpollreis.com:
public/CNAMEcarries the custom domain so GitHub Pages keeps it configured on each deploy. Do not delete it.site: 'https://calebpollreis.com'inastro.config.mjsmakes the generated sitemap and the canonical/OG URLs use the real domain. Keep the two in sync if the domain ever changes.- There is no configured
base, so the site serves from the domain root. In-site links still pass throughwithBase()(src/config/paths.ts), so the site would keep working if it were ever moved to a subpath.
These docs
Section titled “These docs”The documentation you are reading is built by the @astrojs/starlight
integration and served under /docs. The pages live in
src/content/docs/docs/ and the sidebar is configured in astro.config.mjs. They
build and deploy together with the rest of the site, so editing a doc is just
another content change: edit, push to main, done.