Skip to content

Deploy to Netlify

Overview

The monorepo has 5 deployable sites across 3 projects. All deploy from the gizmolab10/mono repo.

Current Sites

SiteNetlify ProjectBase DirBuild CommandPublish Dir
ws appwebseriouslyprojects/wsyarn builddist
ws docswebseriously-documentationprojects/wsyarn docs:build.vitepress/dist
di appdesignintuitionprojects/diyarn builddist
di docsdesignintuition-documentationprojects/diyarn docs:build.vitepress/dist
mono docsmonorepo-documentationsites/docsyarn docs:build.vitepress/dist

Public URLs

SiteNetlify URLCustom Domain
ws apphttps://webseriously.netlify.apphttps://webseriously.org
ws docshttps://webseriously-documentation.netlify.apphttps://docs.webseriously.org
di apphttps://designintuition.netlify.apphttps://designintuition.app
di docshttps://designintuition-documentation.netlify.apphttps://docs.designintuition.app
mono docshttps://monorepo-documentation.netlify.apphttps://docs.gizmolab.com

Dashboard URLs

Config Files

Each docs site has its own VitePress config:

SiteConfig Path
ws docsprojects/ws/.vitepress/config.mts
di docsprojects/di/.vitepress/config.mts
mono docssites/docs/.vitepress/config.mts

Important: No netlify.toml files — all build settings are in the Netlify dashboard.

Check Deploy Status

The hub API provides deploy status:

bash
# All sites
curl http://localhost:5171/deploy-status

# Single site
curl http://localhost:5171/deploy-status/ws
curl http://localhost:5171/deploy-status/di-docs

Returns:

  • state: building, ready, or error
  • created_at: when deploy started
  • published_at: when deploy finished
  • error_message: if failed

Requires NETLIFY_ACCESS_TOKEN environment variable.

Troubleshooting

Deploy fails with syntax error in config.mts

  1. Check the error line number
  2. Look for missing comma after link: property
  3. Run update-project-docs.sh to regenerate sidebar with correct syntax

Deploy builds wrong content

  1. Check Netlify base directory setting in dashboard
  2. Must match project path (e.g., projects/di not /)
  3. Verify no netlify.toml file exists (they override dashboard settings)

"No content change" error

Not a real error — Netlify skips builds when nothing changed. The hub filters these out.

Deploy not triggered after push

  1. Check the repo is gizmolab10/mono (not old standalone repos)
  2. Check the branch is main
  3. Check auto-publishing is enabled in Netlify dashboard

Adding a New Site

  1. Create site in Netlify → Import existing project → GitHub → gizmolab10/mono
  2. Set Base directory to the project path (e.g., projects/newproject)
  3. Set Build command (yarn build for app, yarn docs:build for docs)
  4. Set Publish directory (dist for app, .vitepress/dist for docs)
  5. Rename site to follow naming convention
  6. Add to sites/api.py NETLIFY_SITES dict
  7. Add to sites/index.html config
  8. Add to sites/ports.json if it has a local dev server

Deploy Cleanup (Jonathan only)

The delete-netlify-deploys.sh script cleans up old Netlify deploys.

Setup

Add to ~/.zshrc:

bash
export NETLIFY_ACCESS_TOKEN="your-token-here"

Then: source ~/.zshrc

Getting the Netlify Token

  1. Log in to Netlify at https://app.netlify.com
  2. Click your avatar (top right) → User settings
  3. In the left sidebar, click Applications
  4. Scroll to Personal access tokens
  5. Click New access token
  6. Give it a descriptive name (e.g., macbook-pro-2024)
  7. Click Generate token
  8. Copy the token immediately — you won't be able to see it again

Running the Script

bash
~/GitHub/mono/notes/tools/scripts/delete-netlify-deploys.sh

Token Security