Deploy to Netlify
Overview
The monorepo has 5 deployable sites across 3 projects. All deploy from the gizmolab10/mono repo.
Current Sites
| Site | Netlify Project | Base Dir | Build Command | Publish Dir |
|---|---|---|---|---|
| ws app | webseriously | projects/ws | yarn build | dist |
| ws docs | webseriously-documentation | projects/ws | yarn docs:build | .vitepress/dist |
| di app | designintuition | projects/di | yarn build | dist |
| di docs | designintuition-documentation | projects/di | yarn docs:build | .vitepress/dist |
| mono docs | monorepo-documentation | sites/docs | yarn docs:build | .vitepress/dist |
Public URLs
Dashboard URLs
- ws app: https://app.netlify.com/projects/webseriously/settings/build-and-deploy
- ws docs: https://app.netlify.com/projects/webseriously-documentation/settings/build-and-deploy
- di app: https://app.netlify.com/projects/designintuition/settings/build-and-deploy
- di docs: https://app.netlify.com/projects/designintuition-documentation/settings/build-and-deploy
- mono docs: https://app.netlify.com/projects/monorepo-documentation/settings/build-and-deploy
Config Files
Each docs site has its own VitePress config:
| Site | Config Path |
|---|---|
| ws docs | projects/ws/.vitepress/config.mts |
| di docs | projects/di/.vitepress/config.mts |
| mono docs | sites/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-docsReturns:
state:building,ready, orerrorcreated_at: when deploy startedpublished_at: when deploy finishederror_message: if failed
Requires NETLIFY_ACCESS_TOKEN environment variable.
Troubleshooting
Deploy fails with syntax error in config.mts
- Check the error line number
- Look for missing comma after
link:property - Run
update-project-docs.shto regenerate sidebar with correct syntax
Deploy builds wrong content
- Check Netlify base directory setting in dashboard
- Must match project path (e.g.,
projects/dinot/) - Verify no
netlify.tomlfile 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
- Check the repo is
gizmolab10/mono(not old standalone repos) - Check the branch is
main - Check auto-publishing is enabled in Netlify dashboard
Adding a New Site
- Create site in Netlify → Import existing project → GitHub →
gizmolab10/mono - Set Base directory to the project path (e.g.,
projects/newproject) - Set Build command (
yarn buildfor app,yarn docs:buildfor docs) - Set Publish directory (
distfor app,.vitepress/distfor docs) - Rename site to follow naming convention
- Add to
sites/api.pyNETLIFY_SITES dict - Add to
sites/index.htmlconfig - Add to
sites/ports.jsonif 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
- Log in to Netlify at https://app.netlify.com
- Click your avatar (top right) → User settings
- In the left sidebar, click Applications
- Scroll to Personal access tokens
- Click New access token
- Give it a descriptive name (e.g.,
macbook-pro-2024) - Click Generate token
- 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.shToken Security
- Tokens don't expire by default — review periodically
- Revoke at: https://app.netlify.com/user/applications#personal-access-tokens
- If compromised: revoke immediately, create new one, update
~/.zshrc