Deployment workflow
This page documents our release workflow for the theme (build, validate, deploy) and how we ship this docs site.
TL;DR: Build assets → run GScan validation → zip → upload + activate. For docs and operational changes, we keep a clear rollback path and an auditable release workflow.
Theme deployment (Ghost)
1. Build
From the theme repo root, we run:
yarn dev
We also rely on the build task defined in our Gulp setup. This compiles CSS (PostCSS) and JS (concat + uglify) into assets/built/. For a one-off build before zip, yarn zip runs the full build automatically.
2. Validate (before packaging)
Validation runs Ghost’s theme checker to prevent non-compliant uploads:
yarn test
This runs gscan .. We fix reported errors (and optionally warnings) before creating the zip. CI can run yarn test (and optionally a CSS/JS linter) so packaging only happens when checks pass.
3. Package (zip)
yarn zip
This builds assets and creates a zip (e.g. manny-roy.zip) in the repo root, containing only what Ghost needs: templates, partials, assets, package.json, etc.
4. Upload to Ghost
- In Ghost Admin, we open Settings → Design.
- Under “Installed themes”, we use Upload theme (or “Change theme” and upload).
- We select the zip file and upload.
- We activate the uploaded theme if it isn’t already active.
5. Ghost version
The theme declares engines.ghost: ">=5.0.0" in package.json. We run a Ghost version that satisfies this (5.x or later). If we upgrade Ghost, we re-run GScan and test the theme.
Rollback
Keep a copy of the previous theme zip. To roll back:
- In Settings → Design, we upload the previous zip (or switch to a previously installed theme if still present).
- We activate it. No database rollback is needed for a theme-only change.
When things go wrong (quick checklist)
- Theme upload fails or the UI looks broken:
- Confirm the zip was produced with
yarn zipafteryarn test(GScan). - Re-check that
assets/built/screen.cssandbuilt/main.min.jsare present in the zip.
- Confirm the zip was produced with
- Validation errors after a Ghost upgrade:
- Re-run
yarn teston your machine (matches the packaging path). - Fix reported compatibility/deprecation items in templates/CSS/JS, then rebuild + re-zip.
- Re-run
- Docs site deploy fails:
- Check the host build logs and confirm the Docusaurus publish directory is
build/.
- Check the host build logs and confirm the Docusaurus publish directory is
Docs site deployment (Docusaurus)
This documentation site is separate from the theme:
- Build: From the
docs-site/directory, runnpm run buildoryarn build. Output goes tobuild/. - Hosting: Deployed to docs.mannyroy.com via Netlify (or another equivalent host). Publish directory:
build. - Trigger: Typically a push to the branch connected to Netlify runs the build and deploy. Configure the build command and publish directory in Netlify (or equivalent) to match the Docusaurus project.
Related
- Build and validate — Detailed build and GScan steps
- Observability — Monitoring and what to do when something breaks
- Architecture overview — Stack and repo layout