Publish
Sveltia CMS, Giscus comments, GitHub Pages, and how to host the static build elsewhere.
Astro Sumi emits a static site. There is no application server. Comments, if you want them, are GitHub Discussions via Giscus. Editing in the browser is Sveltia CMS writing markdown back to git.
GitHub Pages (included)
.github/workflows/deploy.yml runs on main:
bun install --frozen-lockfilebun run verify(format, lint, tests, types, production audit)bun run build- Upload
dist/and deploy to GitHub Pages
Set the repo's Pages source to GitHub Actions. Production astro.config.ts uses base: /astro-sumi, so the public URL is https://<owner>.github.io/astro-sumi/.
Set SITE_URL in the environment the build sees (GitHub Actions variables / secrets, or .env committed only if it contains no secrets — SITE_URL is not a secret). Giscus ids are not secrets either, but keep tokens out of the repo.
Pull requests run verify only; they do not deploy.
Other hosts
bun run buildOutput is dist/. Vercel, Netlify, and Cloudflare Pages all work if you set:
- Build command:
bun run build(install Bun on the image) - Publish directory:
dist SITE_URLto the public origin
If the site is served at the domain root, change astro.config.ts so production base is / instead of /astro-sumi.
CMS
/admin/ loads Sveltia CMS from a CDN. It edits the same markdown files. There is no extra CSS or module script.
- In
public/admin/config.yml, setbackend.repotoyour-github-user/your-repoandsite_urlto the public site. - For a hosted GitHub backend, create a GitHub OAuth application, or use Sveltia's local folder picker in Chromium.
- Open
/admin/in development, or/astro-sumi/admin/on GitHub Pages.
Cover images and portraits still use Astro image() fields. Put those files in the repo and set the path in markdown. CMS uploads go to public/static/uploads/. With a base path, prefix public image URLs accordingly.
Chapter comments (Giscus)
Chapter pages can load Giscus (GitHub Discussions).
- Enable Discussions on the repository.
- Install the Giscus app.
- Fill the form at giscus.app.
- Copy values into
.env.local(and into the host's env for production).
GISCUS_ENABLED=true
GISCUS_REPO="yourusername/your-repo"
GISCUS_REPO_ID="R_kgDOH123456"
GISCUS_CATEGORY="General"
GISCUS_CATEGORY_ID="DIC_kwDOH123456"Set GISCUS_ENABLED=false, or omit the ids, to hide the widget. Theme, mapping (pathname), and language defaults live in .env.example.
Quality gate before you push
bun run verify is the same sequence as CI and the pre-push hook. If it fails locally, the Pages workflow will fail too.
Related docs in the repo
The template also keeps shorter copies next to the code:
This studio guide is the long-form user manual. Those files stay as in-repo orientation for anyone who never opens ItamiForge.